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

Home » Public Forums » archive » Problems with control the size of the lat-lon tick labels and the position of my colorbar
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Problems with control the size of the lat-lon tick labels and the position of my colorbar [message #86911] Thu, 12 December 2013 08:51 Go to previous message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array containing maximum values for two arrays
Next Topic: How to determine the mask portion (or unwanted region) from an image and rotate for direction correction using IDL tools?

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

Current Time: Wed Oct 08 13:31:27 PDT 2025

Total time taken to generate the page: 0.00379 seconds