summaryrefslogtreecommitdiffstats
path: root/grapheps.ps
diff options
context:
space:
mode:
Diffstat (limited to 'grapheps.ps')
-rw-r--r--grapheps.ps17
1 files changed, 13 insertions, 4 deletions
diff --git a/grapheps.ps b/grapheps.ps
index db3b8b1..4d41fd9 100644
--- a/grapheps.ps
+++ b/grapheps.ps
@@ -47,6 +47,9 @@ plotdict begin
/YSTEP 0 def
/YSTEPH 0 def
/YTSCL 0 def
+/STP3 0 def
+/STP2 0 def
+/SCL 0 def
/graphrect 0 def
/plotrect 0 def
@@ -165,6 +168,14 @@ plotdict begin
} repeat
} bind def
+/fudge3 % SCL STP3 STP2
+{
+ /STP2 exch def /STP3 exch def /SCL exch def
+ SCL 3 mod 0 eq {STP3} {STP2} ifelse
+%% leads to range error in CVS.
+% SCL abs 3000 gt {STP2} {SCL 3 mod 0 eq {STP3} {STP2} ifelse} ifelse
+} bind def
+
% The arguments are:
% [ MIN-X MIN-Y DELTA-X DELTA-Y ] whole graph rectangle
% [ MIN-COLJ MAX-COLJ ] Numerical range of plot data
@@ -186,11 +197,9 @@ plotdict begin
/XOFF XOFF plotrect 0 get XSCL div sub def
/YOFF YOFF plotrect 1 get YSCL div sub def
/YTSCL plotrect 3 get YRNG aload pop exch sub abs find-tick-scale def
- /YSTEP YTSCL 0 get 3 mod 0 eq {6} {8} ifelse 5 mul yuntrans
- YSCL sign mul def
+ /YSTEP YTSCL 0 get 6 8 fudge3 5 mul yuntrans YSCL sign mul def
/XTSCL plotrect 2 get XRNG aload pop exch sub abs find-tick-scale def
- /XSTEP XTSCL 0 get 3 mod 0 eq {12} {10} ifelse 5 mul xuntrans
- XSCL sign mul def
+ /XSTEP XTSCL 0 get 12 10 fudge3 5 mul xuntrans XSCL sign mul def
/YSTEPH YSTEP 2 div def
/XSTEPH XSTEP 2 div def
} bind def