I have a .ps file and I want to increase the line widths of the main axis (major and minor ticks). Which property in the ps file is the right one to change.
The ps file is available here and you can see the output file below.
UPDATE
UPDATE
According to the BlueBook (pages 21 and 25) and the GreenBook (page 41), the setlinewidth syntax is something like
4 setlinewidth
However, in my file, the setlinewidth is called like this
/sw /setlinewidth load def
It seems that this is a different syntax! I also wrote something like a piece of code to pop a value (3) and set it to linewidth (at least I think)
{ dup 0 eq
{ pop 3
} if
setlinewidth
} bind def
/sw /setlinewidth load def
But it incorrect.
I appreciate if someone help me how to change the linewidth because I am not really going to write a printer driver....
I'd like to add a few supplementary words to accompany Ken's answer, which is IMO the correct view. The basics of the language can be gleaned by checking the Postscript tag-info page. Read the first half of the blue book (it's very short and gets you up to speed with the stacks and operators and syntax and everything). Then you should read the green book for background on why the program is structured as it is with a prolog that defines lots of short names, and a script that looks more like pure data.
If you do that, then you will find that Ken really has given you the answer of how to do it by modifying the postscript. But it is also very true that a "better" way is almost always to re-generate the postscript by modifying the actual source material (whatever that may be, it probably has something closer to a "property" for that element).
Edit: after question update.
As Ken said, you don't actually need to mess with the line
/sw /setlinewidth load def
This isn't calling setlinewidth
, but defining sw
as a shortcut for the longer name.
So, for each section there are 2 things you need to do:
To change the width relative to its current value, you can use currentlinewidth
and do a little math.
currentlinewidth 2 mul setlinewidth
To change it back, you can do the inverse operation, or bracket the whole thing with an extra gsave
... grestore
pair, or save the original width in a definition and use the definition to reset it.
You can use either the long operator names like gsave
or the shortcuts defined in the program, like gs
.