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

Home » Public Forums » archive » mapping problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
mapping problem [message #83768] Wed, 03 April 2013 12:58 Go to next message
mkmvarma is currently offline  mkmvarma
Messages: 24
Registered: November 2007
Junior Member
Hello,
I have a question regarding map plotting. I am using coyote library to plot it. I can plot a global contour map but there are some things that I would like to change in the plot.
1) It plots a nice map but there is a white line along zero degree longitude. How can I fill this in?
2) It puts labels on all of the 4 axes and all I need is label on only two axes.

The plotting statement I use is as follows:

cgLoadCT, 33, NColors=nlevels, Bottom=1,Clip=[0, 255]
;cgLoadCT, 33, /Brewer, NColors=10, Bottom=1, /Reverse

position = [0.1, 0.30, 0.8, 0.95]; [0.125, 0.125, 0.9, 0.800]
cbposition = [0.1, 0.25, 0.8, 0.26];[0.125, 0.865, 0.9, 0.895]

; Set up the map projection and overlay the contour plot.
cgMap_Set, POSITION=position


cgContour, anomaly, lon, lat, /overplot, /Cell_Fill, $
C_Colors=Indgen(nlevels)+1, Levels=levels,charsize=0.6,$
title='Precipitation Trend'


Cgtext,0.45,0.99,ALIGNMENT=0.5,/NORMAL,'Precipitation Trend (1996-2009)',$
charsize=0.8

cgMap_Grid, Map=map, /Box,lonlabel=3,latlabel=3,charsize=0.6
cgMap_Continents, Map=map, Color='black'

cgColorbar, Range=[(Min(levels)), (Max(levels))], OOB_High=nlevels, $
NColors=nlevels-1, Bottom=1, /Discrete, $
Title='Trend (mm/day/decade)' , $
POSITION=cbposition,charsize=0.8;[0.88,0.9,0.90,0.8];[x0,y0, x1,y1]

Thanks,
Mahesh
Re: mapping problem [message #83834 is a reply to message #83768] Sat, 06 April 2013 05:50 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mkmvarma@gmail.com writes:

> I have a question regarding map plotting. I am using coyote library to plot it. I can plot a global contour map but there are some things that I would like to change in the plot.
> 1) It plots a nice map but there is a white line along zero degree longitude. How can I fill this in?

Generally, you have to extend the last column of your data to wrap
around to the first column. You have to do the same thing to your
longitude vector:

lons = [lons, lons[0]]
data = [data, data[0,*]]

> 2) It puts labels on all of the 4 axes and all I need is label on only two axes.

Not much you can do about this in direct graphics. You can use the
function graphics map projections. They only label two of the four axes
when they create box axes on maps.

You could, I suppose, poke around in Map_Grid to make it do what you
want, but this doesn't really seem worth the time it would take to me.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to parse the output of restore, filename, /ver
Next Topic: how to resize a top level base widget

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

Current Time: Wed Oct 08 15:48:36 PDT 2025

Total time taken to generate the page: 0.00555 seconds