Home »
Public Forums »
archive »
Re: axis thickness
Re: axis thickness [message #340] |
Wed, 27 May 1992 01:32  |
dov
Messages: 4 Registered: February 1992
|
Junior Member |
|
|
It's a big hazzle to change all of the various thick parameters
in IDL if all you want to do is to have the graph printed on the
postscript printer with *all* lines thicker. It would be very nice
to have a parameter for the postscript device for multiplication
of linewidth. Another option that I would like to have for postscript
is to be able to specify if the line joins should be mitre, round,
or bevel.
I'm including a small Perl script that multiplies the argument of
linewidth in a postscript file and thus makes the lines thicker.
Unfortunately it contorts stroke characters a bit, perhaps because
of the line join problem.
#!/usr/local/bin/perl -i~
############################################################ ###############
# Program to multiply the argument of linewidth in a postscript file.
############################################################ ###############
while(($_=$ARGV[0]) =~ /^-/) {
shift;
if (/^-m/) {$mult=shift; }
elsif (/^-h/) {
print<<EOH
lwmult - Multiply the argument of linewidth in a postscript file
Usage:
lwmult [-m n] files
Description:
Multiplies the argument of linewidth in a postscript file and
renames the old files to the same file name with an additional
tilde character.
Options:
-m n Set the multiplication factor to n (a floating point number).
Default value is 2.
Author:
Dov Grobgeld 1992-05-24
EOH
; exit;
}
}
$mult=2 unless defined $mult;
$lastLine="";
while(<>) {
# Case of argument for linewidth not over new line
s/(\d+)(\s+setlinewidth)/sprintf("%g$2",$1*$mult)/ie;
# Case of argument and 'setlinewidth' over line boundry
if (/^\s*setlinewidth/) {
$lastLine=~ s/(\d+)\s*\n/sprintf("%g\n",$1*$mult)/ie;
}
print $lastLine;
$lastLine=$_;
print $lastLine if eof;
}
--
___ ___
/ o \ o \
Dov Grobgeld ( o o ) o |
The Weizmann Institute of Science, Israel \ o /o o /
"Where the tree of wisdom carries oranges" | | | |
_| |_ _| |_
|
|
|
Current Time: Thu Oct 09 10:33:23 PDT 2025
Total time taken to generate the page: 1.68389 seconds