[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: landscape plots



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