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

Home » Public Forums » archive » Coyote Graphics PS/PDF output size/orientation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Coyote Graphics PS/PDF output size/orientation [message #85497 is a reply to message #85495] Tue, 13 August 2013 17:33 Go to previous messageGo to previous message
Paul Levine is currently offline  Paul Levine
Messages: 29
Registered: February 2008
Junior Member
On 2013-08-14 00:07:34 +0000, David Fanning said:

> 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.

That much I understood from reading your explanation at
http://www.idlcoyote.com/cg_tips/cglandscape.php but in this case (and
I apologize if my original post was a bit confusing) I do NOT want a
portrait. I want the same landscape image that I have in the display
window (the same one that I get when I write to PNG), but I'm ending up
with a portrain-oriented PDF with a sideways graphic. The display
window and PNG output are the same, but the PDF output is rotated 90
degrees in terms of both the graphic and the 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 tried adding the WXSize and WYSize (though I used 800 for x and 600
for y because I am trying to get landscape output), but I still get the
same result, i.e. PNG oriented correctly and PDF rotated 90 degrees.

But this brings up a somewhat-related question about PNG output. When
I use WXSize=800 and WYSize=600 my PNG file ends up being 752 x 556
pixels, and the bottom of my x axis title is chopped off. Should I not
be getting 800 x 600 pixels out? And is my truncated title indicative
of some mistake on my part? The PDF file shows the entire x axis
title, but of course the file itself is 8.5 x 11 inches.


> 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.

Indeed, using the latest version.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: peeling away layers
Next Topic: arithmetic operation on array

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

Current Time: Fri Oct 10 09:07:01 PDT 2025

Total time taken to generate the page: 2.88158 seconds