Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 17 Nov 2019, 22:16
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Graph paper script
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Wed 18 Dec 2013, 21:02    Post subject:  Graph paper script  

Here is a script that will create professional looking graph paper.

Edit:

To explain the GUI --->

Box Size 10
Horizontal Distance 100
Vertical distance 70

makes a document 1000 horizontal dots by 700vertical dots.

You must convert this to inches or the metric system when using a printer.



Edit: I switched to a pet package for convenience.
It is gettexted for anyone interested in translating.
Start Menu > Documents


Contributed by Vovchik, Seaside and Don White

The script runs in the usual way ./Graphpaper.sh
Follow the instructions and save your graph paper to disk as an SVG file.
Default name is <default>/root/Graphpaper.svg</default>
but that is easy to change by clicking file icon.




Graphpaper.sh.gz
Description  script to gettext - remove fake gz extension
gz

 Download 
Filename  Graphpaper.sh.gz 
Filesize  5.18 KB 
Downloaded  398 Time(s) 
Graphpaper-1.1.pet
Description  Application to make graph paper - gettext version
pet

 Download 
Filename  Graphpaper-1.1.pet 
Filesize  4.19 KB 
Downloaded  436 Time(s) 

Last edited by don570 on Tue 01 Oct 2019, 19:11; edited 3 times in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Thu 19 Dec 2013, 17:50    Post subject:  

version 1.0 - pet package

I switched to a pet package for convenience. It is gettexted
for anyone interested in translating.

Start Menu > Documents

____________________________________
Back to top
View user's profile Send private message 
vicmz


Joined: 15 Jan 2012
Posts: 1268

PostPosted: Fri 27 Dec 2013, 06:54    Post subject:  

Nice Very Happy
Note: the 'save to disk' button isn't gettexted, I've done it myself before translating.
Screenshot_2013-12-27_08_09_22.png
 Description   
 Filesize   18.26 KB
 Viewed   666 Time(s)

Screenshot_2013-12-27_08_09_22.png

Graphpaper.sh.gz
Description  Same as 1.0 but 'save to disk' button gettexted, remove false .gz
gz

 Download 
Filename  Graphpaper.sh.gz 
Filesize  4.82 KB 
Downloaded  401 Time(s) 
Graphpaper.desktop.gz
Description  Translated menu entry, remove false .gz
gz

 Download 
Filename  Graphpaper.desktop.gz 
Filesize  523 Bytes 
Downloaded  393 Time(s) 
MoManager-es-Graphpaper-1.0.tar.gz
Description 
gz

 Download 
Filename  MoManager-es-Graphpaper-1.0.tar.gz 
Filesize  1.06 KB 
Downloaded  391 Time(s) 

_________________
Puppy Linux en español
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Fri 27 Dec 2013, 18:00    Post subject:  

Thanks for looking at the script. I'll post a finished pet package.
I should try a French and German translation.

__________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Sat 28 Dec 2013, 13:43    Post subject: New version 1.1  

New version 1.1

I corrected a dumb mistake that prevented the SVG image from forming
if the 'Save to disk' button was clicked. I didn't realise that functions are
tricky to put in <action> directives if they have an ampersand &.

The function didn't work the way I thought it would and the exiting of the
GUI wasn't occuring when I thought it would occur.

___________________________________________________

Thanks to vicmz there is a Spanish tranlation. I was inspired to
try my hand at translating with the help of Google translate.

I attempted Russian, Portuguese ,French and German.

They are all inside the pet package. I have posted the script if
anyone is interested in translating with momanager.
Remember that momanager requires the devx file to be installed.

____________________________________________________
Back to top
View user's profile Send private message 
icosahedron


Joined: 28 Nov 2011
Posts: 103
Location: UK

PostPosted: Fri 27 Sep 2019, 01:05    Post subject:  

Hi,

Can someone help me to use this application, please?
I'm neither an artist nor a mathematician, so I'm not familiar with the jargon and I can't figure out the formulas.

The Graphpaper application has 5 parameters:
Box Size, Horizontal Distance, Vertical Distance, Width, and Height.

After over an hour of trial-and-error, I've figured that Width and Height are the overall size of the graphpaper in pixels, and that Width needs to be a whole multiple of Horizontal, and Height needs to be a whole multiple of Vertical, but I don't really know what Horizontal and Vertical refer to.

They seem to alter the number of grid squares across the paper, but I'm not sure exactly how, and the Box Size parameter is a complete mystery. It seems to affect the visibility of the lines, and a value of 5 seems to be nor too obtrusive when zoomed out, yet still visible when zoomed to 800x for pixel work, but I can't see what the numbers refer to, or what is actually changing.

Can someone also tell me what the pixel size is on MT Paint? I want to create graph paper with squares of 0.2 / 1.0 cm on an A4 sheet, but I can't figure out what numbers to enter into the parameter boxes to obtain this output.

Thanks.

_________________
Computers: - I just ride 'em, I dunno what makes 'em work.
Console/Terminal? What's that?
I visit the Internet to OBTAIN information, not to PROVIDE it! (Increase Internet Privacy)
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Sat 28 Sep 2019, 15:41    Post subject:  

I've never printed in mtpaint. Apparently it uses pixels so a conversion is needed.

This website seems to do the conversion.

https://www.papersizes.org/a-sizes-in-pixels.htm

____________________________________________________


There are three numbers fill out,
but I've noticed that the script becomes confusing if the standard numbers aren't used. (see image)

The numbers to fill in fields are pixels.

__________________________________________
Screenshot_2013-12-27_08_09_22.png
 Description   
 Filesize   18.26 KB
 Viewed   231 Time(s)

Screenshot_2013-12-27_08_09_22.png

Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 350

PostPosted: Sun 29 Sep 2019, 19:00    Post subject:  

icosahedron wrote:
I want to create graph paper with squares of 0.2 / 1.0 cm on an A4 sheet, but I can't figure out what numbers to enter into the parameter boxes to obtain this output.

The attached Postscript file should produce the paper you want. Just unpack it (gunzip) and send it to printer: lpr graph.ps

If you want to change the parameters (margins, squares size, paper size) the file can be modified in a text editor.
graph.ps.gz
Description 
gz

 Download 
Filename  graph.ps.gz 
Filesize  661 Bytes 
Downloaded  28 Time(s) 
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Tue 01 Oct 2019, 19:05    Post subject:  

I checked the old script on fatdog linux and it works properly
except the inkscape button launches a totally black document??
Perhaps it needs inkscape lite.

To explain the GUI --->

Code:
Box Size  10
Horizontal  Distance   100
Vertical distance   70

makes a document 1000 horizontal dots by 700 vertical dots.

You must convert this to inches or the metric system when using a printer.


_______________________________________________________

wjaguar wrote:
The attached Postscript file should produce the paper you want. Just unpack it (gunzip) and send it to printer: lpr graph.ps

I"ll check using fatdog linux.
______________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Wed 02 Oct 2019, 19:22    Post subject:  

When I opened up the ps format file that wjaguar provided using
a recent windows gimp app I found that there is a fault in the graph paper.
Namely a column isn't wide enough. (see image)
The right column is slightly narrower than left column.
GRAPH-OUTPUT.png
 Description   one column is too narrow
 Filesize   551 Bytes
 Viewed   113 Time(s)

GRAPH-OUTPUT.png

Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12771
Location: Stratford, Ontario

PostPosted: Wed 02 Oct 2019, 19:35    Post subject:  

How about this?
out.png
 Description   
 Filesize   136 Bytes
 Viewed   105 Time(s)

out.png

Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Wed 02 Oct 2019, 20:00    Post subject:  

I used windows 10 GIMP program to open file.
There must be a bug in windows postscript???
Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 350

PostPosted: Wed 02 Oct 2019, 23:28    Post subject:  

don570 wrote:
Namely a column isn't wide enough. (see image)
The right column is slightly narrower than left column.

Some rows & columns will inevitably differ by one pixel from the rest. For the simple reason that DPI means dots per inch. No real-life DPI value gives you a whole number of pixels per millimeter (printer DPI usually is some multiple of 300).
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5370
Location: Ontario

PostPosted: Sat 05 Oct 2019, 12:18    Post subject:  

I checked graph.ps.gz in fatdog linux...

ps2pdf is builtin to fatdog linux and I was able to open the file as graphpaper
in 2 programs ---> gimp and document viewer 2.32

gimp had the same problem as I saw in the window 10 GIMP.

Document viewer 2.32 had the strange problem of two thick black lines
(see image)
graph-document-viewer-2.32.png
 Description   two thick black lines
 Filesize   17.12 KB
 Viewed   64 Time(s)

graph-document-viewer-2.32.png

Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 350

PostPosted: Sun 06 Oct 2019, 07:46    Post subject:  

don570 wrote:
gimp had the same problem as I saw in the window 10 GIMP.

Which is inevitable, as explained above. Pixel grid is not metric.
don570 wrote:
Document viewer 2.32 had the strange problem of two thick black lines (see image)

The thicker lines should be there every centimeter (i.e. after every 4 thinner ones). But, with DPI of mere 96, "Document viewer" was trying to compensate for linewidths it could not reproduce with any precision, by antialiasing the lines, and bungled the job badly (behold the consequences of not knowing what "gamma correction" is).
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0815s ][ Queries: 12 (0.0074s) ][ GZIP on ]