comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » postscript scaling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
postscript scaling [message #14516] Fri, 26 February 1999 00:00
mph280 is currently offline  mph280
Messages: 2
Registered: December 1997
Junior Member
Hello everyone,

I have a question that puzzled me for some time.
Basically I am plotting contour plots on pv-wave,
I need a reliable way of controlling the postsript
size of the plot area.
So far I have tried two ways of doing this:
1)device,xsize=12.,ysize=12./1 lets say for a square data
set or instead of one you can apply any scaling factor.
(incidently the scale factor command that also exists
in postscript output doesn't seem to work)
The above line seem to work only if the scaling is other
than one!I have to add here that postscript has an default
value of 12.7cm vertical offset and 17.78cm width,
ARE THESE VALUES THE PLOT AREA OR ARE THEY THE WHOLE POSTSCRIPT
AREA THAT MIGHT INCLUDE SOME PAGE AREA?
It is these values (17.78,12.7)that one changes to
(12,12)when applying the above line, note that the .(dot)
is required for more accuracy.
The printout of (12,12) is not square!
If one tries to correct the ratio by applying:
xsize=12./1.4,ysize=12./1 then we get a 'squashed'
printout that appears on postcript info to be (8.571,12)
When I tried the reverce,namely xsize=12./1,ysize=12./1.4
(which doesn't really make sense anyway, ie to reduce
the already smaller y axis!)
from info,/device
(we get postscript info 12,8.571)
then the printout is square!
My second method trying to solve this is by:
set_screen,!d.x_size/10.,!d.x_size/1.35,!d.y_size/10.,!d.ysi ze/1.
This will produce a printout which is square(for square array data
that is), note that we divide by 1.35 and not 1.4 for some reason
one needs to apply a second correction on the scale!
This line I placed in my programme before the contour command,
althought the printout is square, the info on postcript
becomes (12,8.571) as the second example above!
The size of my plot area on the printout is (77mm,77mm).
Clearly nothing that I applied really took place,
the above command had some 'force' on the postscript printout
but that doesn't show(from I understand these figures mean
anyway, when info,/device asked while in postscript
I can not make the connection between Size(x,y):(12,8.571)
and REAL printout postscript values, moreover I divided by
1.35 because initially by default postscript size is (17.78,12.7)
therefore 17.78/12.7=1.4 and when I printed that i realised that
another correction needed(I don't know why!) to divide by 1.35
instead of 1.4 to get accurate square printout area.
Since I cannot make the connection, it is trial and error when
we go to any non-square data tables, where for example I need
x to be 1.2 times larger than y, because the array is so.
One might say multiply (1.2)to the 1.35(which I used to square
the plot) but it doesn't always behave accurately, some other
"rounding"must be going on even with the .(dot)included after
the values...
Finally in this very long letter(SORRY!),
is set_screen command apply to all devices, ie the device you're
on at the time or is it designed to work really for x and
somehow I got some "result" for ps?
Many many thanks for any replies,
I am trying to solve this for ages and everytime something
new appears to complicate things!
cheers
Yiannis
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: postscript scaling
Next Topic: Insight

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:52:10 PDT 2025

Total time taken to generate the page: 0.00518 seconds