Re: First modification with a .ps file

[email protected] (Perry Hutchison)
Newsgroups gmane.comp.printing.ghostscript.devel
Message-ID <54d6fe33.M6PE4ulP9g4Y3Uit%[email protected]>
Mahmood N <[email protected]> wrote:

> A linux program, which is not user friendly at the print stage,
> prints a chart in a .ps file. Problem is, the X-Y axis (I mean
> major and minor tics) are very thin and I want to double the
> linewidth (thick the axis).
>
> Where should I modify the .ps file for that purpose? The full
> postscript file is available at
>
> http://pastebin.com/w3w3sefk
>
> and the produced figure is available at
> http://i.stack.imgur.com/WSnfU.jpg

First, commendation to whomever wrote the PostScript generator
used in that program.  That PostScript is _much_ more readable
and malleable than some.

Second, a small ding to the same author for setting linewidth to 0.
This is defined as producing the finest line that the output device
is capable of, but is not generally recommended in practice because
the result is device-dependent (and, depending on the printing
technology used, often difficult to see --  as you are finding here).

All of those "0"-width lines can be changed to width 1 (1/72 of an
inch) by filtering the PostScript file through "sed":

    $ sed -e '/ sw/s/0/1/' < w3w3sefk.ps > LW1.ps

and then printing LW1.ps instead of w3w3sefk.ps.

(That will work on this particular PostScript file, and likely on
others produced by the same application; but don't expect it to work
on "just any" PostScript file -- it depends on the way this particular
PostScript generator sets up its prolog.)

The result looks decent to me -- the data lines are width 2, so the
difference between them and the axes is still readily apparent.
If the "width 1" lines are now too heavy for your purposes, you can
replace the digit 1 in the sed command with a decimal fraction, such
as:

    $ sed -e '/ sw/s/0/0.75/' ...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.