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

Home » Public Forums » archive » Re: How to make GIF 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: How to make GIF file? [message #4545 is a reply to message #4543] Sat, 10 June 1995 00:00 Go to previous messageGo to previous message
mathews is currently offline  mathews
Messages: 6
Registered: January 1995
Junior Member
In article <D9xsFM.7D9@midway.uchicago.edu>,
Mark Rivers <rivers@cars3.uchicago.edu> wrote:
> In article <3ra31t$j08@hecate.umd.edu>, bleau@UMDSP.UMD.EDU (Lawrence Bleau) writes:
>> Hi. I running IDL V3.6.1 and have a question about plotting. First, let me
>> describe what I'm trying to do overall, in case anyone has a better suggestion
>> on how to do it.
>>
>> I want to create a GIF file to put on my system and have it served over the WWW
>> to other sites. This GIF file is a fairly simple plot, with X- and Y-axis, a
>> bunch of points, and lines connecting them. The raw data for this is an Ascii
>> file with columns of floating point numbers.
>>
>> I figure we'll have to write a procedure to read in the values, do some
>> decision making, and plot them. I know about the PLOT command in IDL, and
>> there's enough information I can slug through it and tailor my plots properly;
>> if not I'll just come back here for more info.
>>
>> The puzzling part is how to have PLOT generate a GIF image file. I looked at
>> SET_PLOT, which has a slew of options on output devices (PostScript, HP PCL,
>> CGM, etc.). GIF, however, is *not* one of those options. I noticed there is a
>> WRITE_GIF command, but the manual (unless I've looked in the wrong place)
>> doesn't say how to call it and what it's arguments are. Okay, so one of the
>> arguments is an array in GIF format. That begs the question, however: How does
>> one create the GIF image in the first place? If it isn't done with PLOT, then
>> how? If it is, what's the magic keyword?
>>
>
> Try the following:
>
> IDL> set_plot, 'z' ; Select the Z pseudo device
> ; Set the resolution, turn off Z buffering for increased speed
> IDL> device, set_resolution=[800, 500], z=0
> IDL> plot, findgen(100) ; Draw the plot
> IDL> buff = tvrd() ; Read the bitmap back into an IDL variable
> IDL> write_gif, 'filename', buff, ...
>
> ____________________________________________________________
> Mark Rivers (312) 702-2279 (office)
> CARS (312) 702-9951 (secretary)
> Univ. of Chicago (312) 702-5454 (FAX)
> 5640 S. Ellis Ave. (708) 922-0499 (home)
> Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
>

I use a similar approach with several WWW-based data systems that
invoke CGI perl scripts via a HTML form. The perl script executes
IDL in batch mode, runs a IDL routine to make a plot of the
selected parameters, and writes the results to a GIF. The perl
program output is displayed on the WWW browser as a HTML document
with an inline GIF image.

An example application is the COHOWeb data system via the URL:
http://nssdc.gsfc.nasa.gov/cohoweb/cw.html

Sample examples of various perl programs that use IDL on the web
and the corresponding HTML forms are available via the following
URL: http://coney.gsfc.nasa.gov/Mathews/misc/idl-www.html

Hope this helps.

Jason Mathews

--
------------------------------------------------------------ ------------------
Jason Mathews, Code 633.2 |National Space Science Data Center
NASA/Goddard Space Flight Center|email: mathews@nssdc.gsfc.nasa.gov
Greenbelt, MD 20771-0001 USA |http://coney.gsfc.nasa.gov/Mathews/jason.html
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL and supercomputing
Next Topic: Looking for time_test benchmark results

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

Current Time: Wed Oct 08 17:24:37 PDT 2025

Total time taken to generate the page: 0.00446 seconds