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

Home » Public Forums » archive » Contour plots / ps files
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: contour plots [message #40366 is a reply to message #22062] Mon, 09 August 2004 06:15 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Hans Clarke writes:

> I also want to know how to transfer the generated plot to a postscript
> file. Can you help me?

Well, just execute the commands after you have switched
to the PostScript device driver:

thisDevice = !D.Name
Set_Plot, 'PS'
Device, Filename='myplot.ps'

OpenR, lun, 'yourfile.dat', /Get_Lun
rows = File_Lines('yourfile.dat)
header = ''
data = FltArr(3,rows-1)
ReadF, lun, header, data
Free_Lun, lun
f = Reform(data[0,*])
period = Reform(data[1,*])
gamma = Reform(data[2,*])
Contour, gamma, period, f, /Irregular, NLevels=10

Device, /Close_File
Set_Plot, thisDevice

There are lots of things to know about configuring
the PostScript device with the DEVICE command, but
I typically just use my program PSCONFIG to allow
the user to do it interactively. Saves a lot of
wear and tear. :-)

keywords = PSConfig(Cancel=cancelled)
IF cancelled then RETURN
thisDevice = !D.Name
Set_Plot, 'PS'
Device, _Extra=keywords

You can find the programs for PSCONFIG here:

http://www.dfanning.com/programs/psconfig.zip

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Running an IDL Project
Next Topic: contour plots

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

Current Time: Sat Oct 11 20:01:21 PDT 2025

Total time taken to generate the page: 1.16885 seconds