Dear all,
Using Coyote Graphics routines, I wrote IDL code to plot and
visualize a meteorological stations on a map as function of longitude
and latitude.
I had got a nice map. But when I tried to save the output in a eps
file. I had noticed the points:-
1- the plotting Device is a black before saving the map in eps file.
2- in the eps file, the countries names are not on the corrected place
and collected on the page corner of eps file
how i can correct this problem and add contours showing stations
elevations elevation on the map?
???????????? my code as follows
pro stat_k
data=fltarr(3,33)
f='C:\Documents and Settings\station.prn'
;f='test_ebert.txt'
openr,lun,f,/get_lun
readf,lun,data
free_lun,lun
lat = reform(data[0,*])
lon = reform(data[1,*])
elev = reform(data[2,*])
;?????????????????????????
psobject=obj_new("FSC_PsConfig", /color, /EnCapsulate, /Time, /Bold,
filename="k.eps")
;????????
Device, Decomposed=0, Get_Decomposed=currentColorModel
Window, /Free, XSize=500, YSize=600
;????
psobject-> gui
thisDevice=!D.Name
Set_plot,"ps"
Device, _Extra=PSObject ->GetKeyWords(FontType=fontype)
;????????
TVLCT, FSC_Color(soil_colors, /Triple), 1
Erase, Color=FSC_Color('white')
map_set, /cylindrical, 0,0, limit=[19,08,38,28],/continent,/grid, $
/NoErase, Position=[0.1, 0.1, 0.8, 0.9] ; mercator ;
cylindrical
cgText,380,250,/device, 'Egypt', CHARSIZE=1.5,font=1,ORIENTATION=90.0
cgText, 200,300,/device, 'Libya', CHARSIZE=1.5,font=1,ORIENTATION=0.0
cgText, 350,75,/device, 'Sudan', CHARSIZE=1.5,font=1,ORIENTATION=45.0
cgText, 200,100,/device, 'Chad',
CHARSIZE=1.5,font=1,ORIENTATION=0.0
cgText, 100,100,/device, 'Niger',
CHARSIZE=1.5,font=1,ORIENTATION=0.0
cgText, 70,250,/device, 'Algeria',
CHARSIZE=1.5,font=1,ORIENTATION=90.0
cgText, 60,420,/device, 'Tunisia',
CHARSIZE=1.5,font=1,ORIENTATION=45.0
cgText, 125,450,/device, 'The Mediterranean Sea',
CHARSIZE=1.5,font=1,ORIENTATION=0.0
cgText, 150,20,/device, 'Longitude',
CHARSIZE=1.5,font=1,ORIENTATION=0.0
cgText, 25,300,/device, ' Latitude',
CHARSIZE=1.5,font=1,ORIENTATION=90.0
soil_colors = ['purple', 'dodger blue', 'dark green', 'lime green', $
'green yellow', 'yellow', 'hot pink', 'crimson']
SOILC = fltarr(n_elements(lat))
TVLCT, FSC_Color(soil_colors, /Triple), 1
soilc_colors = BytScl(soilc, Top=7) + 1B
for i = 0, n_elements(lat)-1 do begin
PlotS, lon(i)/1000., lat(i)/1000., PSym=SymCat(15),
Color=soilc_colors, SymSize=0.5
endfor
map_continents,/coasts,/countries, Color=FSC_Color('charcoal')
Map_Grid,/box, Color=FSC_Color('charcoal')
Device,/close_File
set_plot, thisDevice
obj_Destroy, psObject
Device, Decomposed=currentColorModel
end
???????????
thanks
|