[Thread Prev][Thread Next][Index]

[ferret_users] thicken lines in postscript output



Hi Ferreters -

Another answer, not question.

Many will have noticed that the plot lines produced by Ferret look great in gif files, but are often too thin in postscript or pdf. Also, the distinctions between line thicknesses 1,2,3 are not pronounced in postscript. It is often desirable to thicken the lines. Here are two methods to automatically edit the postscript output of Fprint to do that, by editing the "line weight" (lw) lines in the postscript file. Either method accomplishes exactly the same thing.

Billy K
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method 1 (unix sed):

Make a file "double_line_wt", consisting of the following text (between the dashed lines):
----------------
# script to increase line weights of Ferret output
sed 's_3.000000 lw_6.000000 lw_g' < $1.ps >! foo; \mv foo $1.ps
sed 's_2.000000 lw_4.000000 lw_g' < $1.ps >! foo; \mv foo $1.ps
sed 's_1.000000 lw_2.000000 lw_g' < $1.ps >! foo; \mv foo $1.ps
----------------
Make it executable: chmod a+x double_line_wt

To double the thickness of all lines, call it from the command line with the filename made by Fprint (omit the .ps):

double_line_wt filename
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method 2 (vi):

Make a file "vi_double_line_wt", consisting of the following text (between the dashed lines):
----------------
:%s_3.000000 lw_6.000000 lw_g
:%s_2.000000 lw_4.000000 lw_g
:%s_1.000000 lw_2.000000 lw_g
:wq
----------------

Use vi to thicken the lines. From the command line:

vi filename.ps -s {vi_double_line_wt}

This will quickly open the file in vi, perform the editing, and close it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Extensions to stronger line-thickening are obvious.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@noaa.gov
Tel: 206-526-6221
Fax: 206-526-6744
Home page: http://www.pmel.noaa.gov/people/kessler/



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement