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

Home » Public Forums » archive » save problems
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: save problems [message #86647 is a reply to message #86624] Mon, 25 November 2013 14:28 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
If you use function graphics (FG), then if you do something like

p = plot(x,y)
p = plot(x2,y2,/overplot)

you can save the generated plot in any of your required formats like so:

p.save, "plot.png"
p.save, "plot.pdf"

etc.

Same for other FG function like image, surface, etc.

The extension on the filename does all the hard work.

See http://www.exelisvis.com/docs/Save_Method.html

*BUT* - very importantly - if this question is in relation to your other
post, where you are generating many plots within a loop (using old style
direct graphics, DG), then ignore everything I said above and do what
DavidF suggested and use his Coyote Graphics (CG) tools.

Using function graphics in a loop will slow your script down by many
many orders of magnitude.

cheers,

paulv

On 11/24/13 10:06, David Fanning wrote:
> Chrisss writes:
>
>> I use IDL 8.2.2 and my questions are the following:
>>
>> 1- is possible to save plot and its oplot in the same .pdf (or png, jpeg, etc) file?
>> 2- is possible to save tvscl window in a .pdf (or png, jpeg, etc) file?
>
> Oh, boy, are you in for a big surprise! And resizeable windows, too!
>
> http://www.idlcoyote.com/graphics_tips/coyote_graphics.php
>
> Here is how to put multiple commands in a single plot and save it in any
> of the formats you mention:
>
> http://www.idlcoyote.com/cg_tips/multicmds.php
>
> With your image, just use the OUTPUT keyword and the appropriate
> extension and everything is handled for you:
>
> IDL> cgImage, image, /Scale, OUTPUT='myimage.pdf'
>
> Cheers,
>
> David
>
> P.S. Where have you been all my life? I've been writing programs just
> for you!
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unexpected negative values when reading txt file
Next Topic: lamda default value in CURVEFIT function

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

Current Time: Fri Oct 10 04:50:24 PDT 2025

Total time taken to generate the page: 1.51968 seconds