Re: Coyote Graphics PS/PDF output size/orientation [message #85495 is a reply to message #85493] |
Tue, 13 August 2013 17:07   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul Levine writes:
> But when I output to PostScript or PDF, using either the Coyote
> Graphics window "File" drop-down menu, or using cgControl,
> Output='filename.ps/pdf', I end up with an 8.5 x 11 inch file with my
> plot rotated 90 degrees counterclockwise. The aspect ratio of my plot
> is correct, so if I rotate the page, everything looks good, except that
> I have excess whitespace on either side. Also, I'd like to
> programmatically create lots of PDF files as output, so having to
> rotate each of them will be a bit cumbersome (I'm sure I can automate
> that outside of IDL, but would prefer to learn how to do it right the
> first time).
>
> Do I need to be wrapping my graphics commands with ps_start and ps_end
> so that I can explicitly specify the /landscape keyword to ps_start?
The output from a cgWindow takes on the aspect ratio of the window,
since it assumes you want output that resembles as closely as possible
what you are looking at in the window. So, the simple way to get a
portrait aspect ratio in your PostScript and PDF output is to create a
window with a portrait aspect ratio.
You can either grab the window and muscle it into the correct size, or
you can make it the right size when you create it. Something like this:
cgWindow, WXSize=600, WYSize=800
cgPlot, cgDemodata(1), /AddCmd
Or, something like this:
cgPlot, cgDemoData(1), /Window, WXSize=600, WYSize=800
Note that the latter command only works if there are no cgWindows
currently on the display, since it uses whatever window is "open" or
available, as normal IDL commands do.
I don't have a way currently to resize a window programmatically, but I
will in about five minutes. :-)
> I am using Mac OS X 10.8.4 with GPL GhostScript 9.07 and the newest
> version of Coyote Graphics (downloaded today)
Make sure you got today's *afternoon* version. The version this morning
was causing me some trouble after I made a change in cgPS2Raster. I had
to revert back to the original file until I get the problem figured out.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|