Hello,
I tried to write the following code to make a plot:
(N.B:This is not complete but a part of the code!)
;------------
PRO test
cgPS_Open, Fig.ps, FONT=-1, CHARSIZE=0.5
cgDisplay,1200,1000
Lats=[50.84D,50.96D] & CenterLat=(Max(Lats) + Min(Lats)) / 2.0
Lons=[6.36D,6.50D] & CenterLon=(Max(Lons) + Min(Lons)) / 2.0
cgMap_Set, CenterLat, CenterLon, /Cylindrical, /NoBorder, /NoErase, $
Limit=[50.84D,6.35D,50.96D, 6.51D], Position=[0.05, 0.47, 0.5, 0.92]
cgMap_Grid, /BOX, Color='charcoal', Thick=(!D.Name EQ 'PS') ? 2 : 1
cgLoadCT, 33 , Bottom=1
tickvalues=['0','100','200','300','400','500',$
'600','700','800','900','1000',$
'1100','1200','1300','1400','1500']
cgColorbar, Range=[0,1500],Bottom=1,Font=-1, Divisions=15, Title='W m!E-2!N', $
Format='(I4)',Ticknames=tickvalues,TLOCATION='Bottom',/FIT, $
Minor=10, CHARSIZE=0.7,OOB_FACTOR=0.5, Position=cgLayout([2,2,1])
cgPS_Close,/PNG
cgPS2Raster,Fig_filename,/PNG, Width=300
END
; ------------------------
Here are my problems ...
(1) How to control the font size of the lat-lon values on the grid map?
(2) Can I disable to display of lat-lon values on TOP and RIGHT side on the grid map?
(3) If I want to include X-label (i.e., 'Latitude') and Y-label(i.e., Latitude) for the grid map, then how can I do that?
(4) How to position the colorbar if I want to at the bottom of this grid map?
(5) If I change the Position values in the cgMap_Set command, I see the width of the colorbar at the top changes? What keyword actually controls the width of this colorbar?
I want to divide my plotting area into 2 columns and 2 rows and include this figure in the first column and first row. I was playing with almost all keywords basing on the descriptions for cgMap_Set, chMap_Grid, cgColorbar and still unable to understand properly what I am doing wrong in my figure? I want my colorbar on top as now and want to position properly so that i can see the title also properly. Can anyone point at what I am doing wrong?
Thanks in advance
|