Re: Suppress Plots [message #77340] |
Mon, 22 August 2011 12:00 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Michael Galloy writes:
> Yes, make your own window routine, mg_window or whatever that does the
> right thing for each type of graphics device. There will still be an IF
> statement (or more likely a CASE statement), but it will only be in one
> place.
It would take about 2 seconds to modify cgDisplay to do the
right thing for the NULL device. And all your other devices
come along free for the ride!
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Suppress Plots [message #77341 is a reply to message #77340] |
Mon, 22 August 2011 11:36  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 8/22/11 12:19 PM, Alex Young wrote:
> I have a number of scripts in which I have many calls to the WINDOW
> routine. I would like to find a way to have a "no plot" option
> without having to put an IF statement before each call to WINDOW. I
> tried placing "set_plot, 'NULL' " at the beginning, but this will
> crash whenever it reaches a call to WINDOW. Is there an easy way to
> get around this?
>
> Thanks.
>
> Alex
Yes, make your own window routine, mg_window or whatever that does the
right thing for each type of graphics device. There will still be an IF
statement (or more likely a CASE statement), but it will only be in one
place.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|