Ok, here is what I'm doing (after defining data, lon, lat and nlevels) in order to simply plot a data projected on map directly into PostScript file:
=======
set_plot, 'PS'
PageParam = PSWINDOW(/LANDSCAPE, /CM, PAGESIZE='A4')
PS_START, filename = work_path+'profiles_correlation_on_map.ps'
levels = cgConLevels(Float(data), NLevels=nlevels+1, MinValue=Floor(Min(data)), STEP=step, Factor=1)
LoadCT, 0
cgLoadCT, 2, /Reverse, /Brewer, NColors=nlevels-1, Bottom=1
TVLCT, cgColor('white', /Triple), nlevels
map = Obj_New('cgMap', 'Equirectangular', Ellipsoid=19, $
XRange=xrange, YRange=yrange, /LatLon_Ranges, CENTER_LON=center_lon, $
Position=[0.1, 0.1, 0.9, 0.8], Limit=[Min(lat), Min(lon), Max(lat), Max(lon)])
map -> AddCmd, Method='Erase'
map -> AddCmd, Method='Draw'
cgContour, data, lon, lat, /Cell_Fill, /Overplot, /Outline, C_Colors=Indgen(nlevels)+1, Levels=levels, Map=map, OutColor='White', /AddCmd
cgMap_Grid, Map=map, /Box, /AddCmd
cgMap_Continents, Map=map, Color='tomato', /AddCmd
cgColorbar, Range=[Min(levels), Max(levels)-step], OOB_High=nlevels, $
NColors=nlevels-1, Bottom=1, /Discrete, $
Title='Temperature ' + cgSymbol('deg') + 'K', $
Position=[0.1, 0.91, 0.9, 0.95], /AddCmd
cgControl, Execute=1
PS_END
set_plot, 'X'
==========
and here is what I get:
CGMDWINDOW::INIT-> WSET: Routine is not defined for current graphics device
Do you by any chance see what am I doing wrong?
Alex
|