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

Home » Public Forums » archive » colorbar question
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
colorbar question [message #79899] Tue, 17 April 2012 00:48 Go to next message
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
Hi all
I am looking for help and advices. I am plotting map showing cities. I
would like put different colors in these cities that correspond with a
colorbar. The cities will have some values that should be display on
the colorbar. I red some staff on this but I am not winning, I spent
all most a half month trying this, Please help me.
I will have some values like this NAQ=2.2, STF=1.4, etc


loadct,33
minval=-100
maxval=100
map_set, 72.5,-45,/orthographic,/isotropic, limit=[55,-75,90,-15],/
continents,/grid
cgcolorbar,range=[minval,maxval],/vertical,divisions=10

;lons=[-42.68,-38.56,-37.56,-36.66,-40.25,-37.56,-38.72,-41. 87,-39.46,-41.11,-32.05,-28.35]
;
;lats=[65.22,66.92,69.52,70.98,72.18,73.56,74.83,75.97,78.57 ,80.35,82.71,84.46]

lons=[314.56,310.32,308.27,307.10,309.28,306.43,306.47,307.8 7,303.85,302.82,294.90,290.77]
lats=[61.16,62.00,64.17,65.42,67.02,67.93,69.25,70.68,72.78, 74.57,76.02,77.47]

!p.charsize=0.8
cgplot,lons,lats,psym=4,/overplot

cities=['NAQ','FHB','GHB','SKT','STF','ATU','GDH','UMQ','UPN ','KUV','SVS','THL']

xyouts,lons,lats,cities
xyouts,337,61.23,'*GOOSE BAY',charthick=1.2,charsize=1,/data

end

Many thanks
Zolile
Re: colorbar question [message #80108 is a reply to message #79899] Thu, 03 May 2012 06:38 Go to previous message
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
On May 2, 3:43 pm, zolile mtumela <zolilemtum...@gmail.com> wrote:
> On Apr 20, 8:38 am, zolile mtumela <zolilemtum...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>> On Apr 18, 2:13 pm, David Fanning <n...@idlcoyote.com> wrote:
>
>>> zolile mtumela writes:
>>>> So far I managed to use different colors for these cities, now  I am
>>>> studying about colorbar  so that I can use these color city there!!
>
>>> If you don't have too many cities, I would use the discrete
>>> color bar, cgDCBar, to label these colors. You could also
>>> use the DISCRETE keyword with cgColorbar, but this is
>>> better for labeling a range of values as a particular
>>> color.
>
>>> Cheers,
>
>>> David
>
>>> --
>>> David Fanning, Ph.D.
>>> Fanning Software Consulting, Inc.
>>> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
>>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>> Thank you David again
>>  I am getting there with your assistance, I used cgDCBar and lebels,
>> work very well.
>> many thanks
>>  Zolile
>
> Hi David
> I am looking for help and suggestions,  in this program, i want to put
> boxes next to these  cities and these boxes must have different colors
> as colorbar/cities.
> There idea for this program is , I want to show  two  or more things/
> values in one city, which will correspond with colorbar.
> Your help is highly appreciated.
> Many thanks
> Zolile

Thank you again,
I found a way to present this which I will try to do it, I will use
vectors/arrows then I will see from there.
Many thanks
Zolile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Relationship between IDLgrXXXX and associated NG functions. Was: IDL documentation gripe - How to erase a new graphics window?
Next Topic: IDL 8.1 , SVN & eclipse

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

Current Time: Wed Oct 08 15:12:45 PDT 2025

Total time taken to generate the page: 0.00850 seconds