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 #74397] Tue, 11 January 2011 12:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Wow! This just gave me an idea for my Coyote Graphics
> routines. I realized I could add an OUTPUT keyword to
> my routines, which in about 10 lines of code will give
> me the ability to create PostScript, PNG, JPEG, TIFF, etc.
> output files from my routines without drawing anything
> on the display.
>
> I just tried it with FSC_Plot and got a terrific PNG
> file, with beautiful PostScript fonts (not ugly Hershey
> fonts) by typing this command. OUTPUT=2 selects PNG files.
>
> IDL> fsc_plot, loaddata(1), color='red', axiscolor='blue', output=2
>
> Man, you have GOT to like that! :-)

Alright, now that I've had a cold shower and a chance
to cool off (I could have run outside and run around
in the snow on this frigid, sunny day in Colorado), I
am coming to my senses. :-)

What I accomplished in FSC_PLOT in 10 lines above,
I can really accomplish in three lines at the IDL
command line:

IDL> PS_Start
IDL> FSC_Plot, loaddata(1), color='red', axiscolor='blue'
IDL> PS_End, /PNG

(The extra lines were for the CASE statement, selecting
the different kinds of output plots.)

The problem with putting that *into* FSC_PLOT is that
PS_Start and PS_End have keywords that can control some
of the properties of the output (eg., FILENAME). If I
put the commands into FSC_Plot, I have to have some way
of getting these keywords into FSC_Plot, too. So that's
another 10 or so lines, plus documentation. It was right
about in here that I began to wonder if this was such a
bright idea after all. :-)

I think I'll probably leave things they way they are for
the moment. After the book is out, I plan to turn these
routines into objects anyway (accessed as functions,
the way IDL 8 function graphics are). I guess it probably
makes more sense to leave the extra bells and whistles
alone until then.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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 04:04:32 PDT 2025

Total time taken to generate the page: 1.59997 seconds