Landscape plots the other way up...? [message #1982] |
Mon, 18 April 1994 05:26  |
atmnjl
Messages: 5 Registered: January 1993
|
Junior Member |
|
|
A friend of mine is producing postscript output from IDL with DEVICE,/LANDSCAPE
which rotates the plot through 270 degrees. However, he would prefer it to
rotate it through 90 degrees. Has anyone found a way to do this (without just
editing the postscript)?
Thanks in advance
Nathaniel Livesey
Dept. of Atmospheric Physics
Oxford, UK.
|
|
|
|
Re: landscape plots [message #21892 is a reply to message #1982] |
Thu, 28 September 2000 00:00  |
Liam E. Gumley
Messages: 378 Registered: January 2000
|
Senior Member |
|
|
Stuart Colley wrote:
> I tried using the /Landscape keyword to produce a Landscape plot when
> using the PS device, since the default is portrait. When viewing the
> resulting .ps file with ghostview, the ghostview window is changed to be
> landscape rather than portrait, but the plot is totally screwed up. Only
> about 5% of the image (image is a mixture of Plot and Tv) is in the
> window, and from what I can see of the image, it appears that it has been
> rotated through 180 degrees.
>
> Is there anything else I must do other than set /Landscape when using
> Device?
Displaying an image with plot overlays in PostScript Landscape mode is
so fiendishly difficult with TV that I wouldn't even try it. I'd use
IMDISP instead, which is designed to do this sort of thing
automatically, e.g.
set_plot, 'PS'
device, /landscape, /color, bits=8, filename='myimage.ps'
imdisp, dist(256), /axis, title='Frequency Distribution'
device, /close_file
Check out the source code at
http://cimss.ssec.wisc.edu/~gumley/imdisp.html
Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
|
|
|
Re: landscape plots [message #21893 is a reply to message #1982] |
Thu, 28 September 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Stuart Colley (src@star.ucl.ac.uk) writes:
> I tried using the /Landscape keyword to produce a Landscape plot when
> using the PS device, since the default is portrait. When viewing the
> resulting .ps file with ghostview, the ghostview window is changed to be
> landscape rather than portrait, but the plot is totally screwed up. Only
> about 5% of the image (image is a mixture of Plot and Tv) is in the
> window, and from what I can see of the image, it appears that it has been
> rotated through 180 degrees.
>
> Is there anything else I must do other than set /Landscape when using
> Device?
Yes, you must realize that the YOFFSET is pointing in the -X
direction and that the XOFFSET is pointing in the +Y direction,
with respect to your plot. (Uh, don't ask me why.)
To get things sorted out, you probably need to subtract
your current XOFFSET from the page length and assign that
to the YOFFSET keyword and then assign your current YOFFSET
value to the XOFFSET keyword. Now your plot will at least
be on the page, although probably upside down in Ghostview.
Just set the Viewing Option in GhostView to Seascape and
you are all set. :-)
Or, if this gives you a headache just thinking about it,
you can configure your PostScript output graphically
using my PSConfig suite of programs:
http://www.dfanning.com/programs/psconfig.zip
For European type output on A4 paper, you would do
something like this:
psKeywords = PSConfig(/European, Cancel=cancelled)
That little plot area on the right is where your graphics
are going to go on the PostScript page. You can move the
plot around, resize it, center it, switch to landscape
mode, etc. When you are all set, hit the Accept button.
The function returns all the keywords required to configure
your PostScript page exactly the way you just specified.
You don't have to know anything at all about how the PostScript
device keywords work. The code looks something like this:
IF cancelled THEN RETURN
thisDevice = !D.Name
Set_Plot, 'PS'
Device, _Extra=psKeywords
And you are set to write your graphics commands:
Plot, mydata
Device, /Close_File
Set_Plot, thisDevice
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: landscape plots [message #21894 is a reply to message #1982] |
Thu, 28 September 2000 00:00  |
promashkin
Messages: 169 Registered: December 1999
|
Senior Member |
|
|
I'd recommend checking out David Fanning's web site. For instance,
http://www.dfanning.com/tips/ps_landscape.html and http://www.dfanning.com/programs/docs/fsc_psconfig.html
Cheers,
Pavel
Stuart Colley wrote:
>
> hi,
> I tried using the /Landscape keyword to produce a Landscape plot when
> using the PS device, since the default is portrait. When viewing the
> resulting .ps file with ghostview, the ghostview window is changed to be
> landscape rather than portrait, but the plot is totally screwed up. Only
> about 5% of the image (image is a mixture of Plot and Tv) is in the
> window, and from what I can see of the image, it appears that it has been
> rotated through 180 degrees.
>
> Is there anything else I must do other than set /Landscape when using
> Device?
>
> cheers,
> S
|
|
|