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

Home » Public Forums » archive » Re: using plot() function in a batch file
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: using plot() function in a batch file [message #74400 is a reply to message #74399] Tue, 11 January 2011 11:31 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 1/11/11 11:45 AM, Marc Buie wrote:
> Folks -
>
> I've been investing some time in working with the new plotting functions in IDL v8.0. Things are still a little rough around the edges but there are definite advantages, particularly the device independence.
>
> There are occasions when I generate graphics in a batch file or cron job. Under these circumstances, the IDL process does not have access to a display (X or otherwise). With direct graphics I used the 'Z buffer' as the device.
>
> Has anyone found a way to do this with the new tools? I've been all over the documentation on this and can't find any relevant discussion. I did try the following:
>
> p=plot(x,y,hide=1)
> p.save,'test.png'
>
> but this crashes with the following message:
>
> % WIDGET_CONTROL: Unable to connect to X Windows display: :0.0
> % PLOT: WIDGET_CONTROL: Unable to establish X Connection.
>
> This doesn't sound very encouraging but I'm still holding out hope that there's something I've forgotten about and just haven't been able to locate in the documentation.
>
> Cheers,
> Marc

Use the /BUFFER keyword to send the output to a buffer. It can then be
saved with the save method:

p = plot(x, y, /buffer)
p->save, 'test.png'

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: using plot() function in a batch file
Next Topic: IDLdoc 3.3.1 bug fix release

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

Current Time: Fri Oct 10 08:41:39 PDT 2025

Total time taken to generate the page: 0.79839 seconds