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

Home » Public Forums » archive » strange postscript error on certain IDL plots
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: strange postscript error on certain IDL plots [message #89648 is a reply to message #89647] Wed, 05 November 2014 08:10 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> P.S. I doubt this has anything to do with IDL, though. Do you have
> example code to create the PostScript file?

No attempt to get anything right, except the same kind of plot you are
creating. It works great for me! Using IDL 8.2.3 on Windows.

image = cgDemoData(7)
image = cgScaleVector(image, -200.0, 1500.)
map = cgMap('Equirectangular', Limit=[-90, -180, 90, 180])
image = Shift(image, 180, 0)
dims = Size(image, /Dimensions)
lons = cgScaleVector(Findgen(dims[0]), -180, 180)
lats = cgScaleVector(Findgen(dims[1]), -90, 90)
cgLoadCT, 0
pos = [0.1, 0.3, 0.9, 0.9]
map -> SetProperty, Position=pos
cgDisplay
cgImage, image, Position=pos, /Scale, /Save, $
XRange=[-180,180], YRange=[-90,90]
cgColorbar, Range=[Min(image), Max(image)], $
Position=[0.1, 0.1, 0.4 , 0.15]
map -> Draw
cgMap_Grid, /Box, Map=map
conColors = ['red6', 'grn6', 'yellow', 'blu6']
TVLCT, cgColor(conColors, /Triple), 1
cgContour, image, lons, lats, Levels=[500, 750, 1000, 1200], $
/Fill, /Overplot, Map=map, C_Colors=Bindgen(4)+1B
cgColorBar, Range=[500, 1200], Divisions=3, $
Position=[0.6, 0.1, 0.9 , 0.15], NColors=4,Bottom=1
END

Code I used to create the plot:

IDL> cgPS_Open, 'test.ps'
IDL> .Run ps_example
IDL> cgPS_Close, /PNG, DELETE_PS=0

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Curve Fitting to timeseries using a set of 8 sine and cosine functions
Next Topic: reading data with numbers and strings from data file

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

Current Time: Thu Oct 09 21:07:00 PDT 2025

Total time taken to generate the page: 1.18766 seconds