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

Home » Public Forums » archive » Re: PostScript output and Aspect
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
Re: PostScript output and Aspect [message #82223] Thu, 29 November 2012 16:33
JP is currently offline  JP
Messages: 55
Registered: April 2008
Member
Cool! Thanks!



On Friday, 30 November 2012 10:45:28 UTC+11, David Fanning wrote:
> JP writes:
>
>
>
>> I am trying to get a series of multiple plots using PS_Start and PS_End and can't get the settings right.
>
>> With cgWindow I can get my plots nicely on the screen and even muck around with the aspect ratio and finally save a PNG (not so interested in PostScript actually).
>
>> For example:
>
>>
>
>> cgWindow, wMulti=[0,3,1], wxsize=1000, wySize=300
>
>> cgPlot, randomn(seed, 100), /window, /addcmd
>
>> cgPlot, randomn(seed, 100), /window, /addcmd
>
>> cgPlot, randomn(seed, 100), /window, /addcmd
>
>>
>
>> then I save to PNG using the Save Window As > Raster Image via ImageMagick > PNG option and I get what i want. BUT apparently the resize option in ImageMagick left to the default 0.5 and my PNG is a bit blur. (David, would be nice if there was an option to change that default).
>
>
>
> There are all KINDS of options to change the defaults! See the
>
> 100 or so keywords to cgControl or cgWindow_SetDefs. ;-)
>
>
>
>>
>
>> So I try with:
>
>> PS_Start, 'myImage.png'
>
>> !P.Multi=[0,3,1]
>
>> cgPlot, randomn(seed, 100)
>
>> cgPlot, randomn(seed, 100)
>
>> cgPlot, randomn(seed, 100)
>
>> PS_End, /PNG, Resize=100
>
>>
>
>> Now I get rid of the blur in the PNG but the Aspect of my final plots has changed from what i wanted. I tried to play with the settings using the /GUI option but still can't get it right... Am I missing something very obvious?
>
>
>
> Use cgDisplay to set up your "display window". If you
>
> are using an actual display, it will create a window
>
> with that aspect ratio. If you are in PostScript, it
>
> will create a PostScript window with that aspect ratio:
>
>
>
> ps_start
>
> cgDisplay, 1000, 300
>
>
>
> ...
>
> ps_end, /png
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: PostScript output and Aspect [message #82224 is a reply to message #82223] Thu, 29 November 2012 16:02 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Well, I was about to say this:

I always like to set the x/ysize of my PS plots explicitly, converting the x/y size to inches:

PS_Start, 'myImage.png', XSIZE=10, YSIZE=3, /INCHES

which should give you what you want.

...but I think I'll start using cgDisplay instead :-)

On Thursday, November 29, 2012 5:37:35 PM UTC-6, JP wrote:
> Hi there,
>
>
>
> I am trying to get a series of multiple plots using PS_Start and PS_End and can't get the settings right.
>
> With cgWindow I can get my plots nicely on the screen and even muck around with the aspect ratio and finally save a PNG (not so interested in PostScript actually).
>
> For example:
>
>
>
> cgWindow, wMulti=[0,3,1], wxsize=1000, wySize=300
>
> cgPlot, randomn(seed, 100), /window, /addcmd
>
> cgPlot, randomn(seed, 100), /window, /addcmd
>
> cgPlot, randomn(seed, 100), /window, /addcmd
>
>
>
> then I save to PNG using the Save Window As > Raster Image via ImageMagick > PNG option and I get what i want. BUT apparently the resize option in ImageMagick left to the default 0.5 and my PNG is a bit blur. (David, would be nice if there was an option to change that default).
>
>
>
> So I try with:
>
> PS_Start, 'myImage.png'
>
> !P.Multi=[0,3,1]
>
> cgPlot, randomn(seed, 100)
>
> cgPlot, randomn(seed, 100)
>
> cgPlot, randomn(seed, 100)
>
> PS_End, /PNG, Resize=100
>
>
>
> Now I get rid of the blur in the PNG but the Aspect of my final plots has changed from what i wanted. I tried to play with the settings using the /GUI option but still can't get it right... Am I missing something very obvious?
>
>
>
> thanks ,
>
>
>
> JP
Re: PostScript output and Aspect [message #82225 is a reply to message #82224] Thu, 29 November 2012 15:45 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JP writes:

> I am trying to get a series of multiple plots using PS_Start and PS_End and can't get the settings right.
> With cgWindow I can get my plots nicely on the screen and even muck around with the aspect ratio and finally save a PNG (not so interested in PostScript actually).
> For example:
>
> cgWindow, wMulti=[0,3,1], wxsize=1000, wySize=300
> cgPlot, randomn(seed, 100), /window, /addcmd
> cgPlot, randomn(seed, 100), /window, /addcmd
> cgPlot, randomn(seed, 100), /window, /addcmd
>
> then I save to PNG using the Save Window As > Raster Image via ImageMagick > PNG option and I get what i want. BUT apparently the resize option in ImageMagick left to the default 0.5 and my PNG is a bit blur. (David, would be nice if there was an option to change that default).

There are all KINDS of options to change the defaults! See the
100 or so keywords to cgControl or cgWindow_SetDefs. ;-)

>
> So I try with:
> PS_Start, 'myImage.png'
> !P.Multi=[0,3,1]
> cgPlot, randomn(seed, 100)
> cgPlot, randomn(seed, 100)
> cgPlot, randomn(seed, 100)
> PS_End, /PNG, Resize=100
>
> Now I get rid of the blur in the PNG but the Aspect of my final plots has changed from what i wanted. I tried to play with the settings using the /GUI option but still can't get it right... Am I missing something very obvious?

Use cgDisplay to set up your "display window". If you
are using an actual display, it will create a window
with that aspect ratio. If you are in PostScript, it
will create a PostScript window with that aspect ratio:

ps_start
cgDisplay, 1000, 300

...
ps_end, /png

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PostScript output and Aspect
Next Topic: VIS at 2012 AGU Fall Meeting

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

Current Time: Wed Oct 08 15:10:39 PDT 2025

Total time taken to generate the page: 0.00547 seconds