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

Home » Public Forums » archive » Arrow and vectors
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
Arrow and vectors [message #80086] Mon, 07 May 2012 22:23
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
Hi all
In this program I want to show vector arrows on the map. I got cities
and colorbar, Next to cities I want to plot an Arrow vector of
amplitudes for the given time and plot another arrow vector for phase
angle and show the rotation of phase. I tried but I am not winning.
If I can manage to solve this, I will display those values with colors
on the colorbar. Any help will be highly accepted.

The program is like this
loadct,33
cgtext=[1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0]
;levels=[1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0]
map_set, 72.5,-45,/orthographic,/isotropic, limit=[55,-75,90,-15],/
continents,/grid

;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=6,/overplot

time=[5.,28.,48.,68.,88.,112.,132.,152.,172.,192.,212.,238., 258.,278.,298.,322.,342.]

amplitude=[0.20,0.21,0.22,0.23,0.22,0.20,0.16,0.14,0.15,0.18 ,0.22,0.25,0.26,0.25,0.22,0.21,0.20]

phase=[5.,28.,48.,68.,88.,112.,132.,152.,172.,192.,212.,238. ,258.,278.,298.,322.,342.]

;lot,time,amplitude
;
;for i=0,n_elements(amplitude)-1 do
;stop
;cgArrow,time,amplitude,...,...,/data
;
;plots,67.28,309.43

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

citycolor=['navy','blue','royal blue','lime green','green','lawn
green','chartreuse','green yellow','tomato', $

'orange red','red','crimson']


for j=0,n_elements(cities)-1 do
cgtext,lons(j),lats(j),cities(j),color=citycolor(j)


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

;labels=['1.0','1.5','2.0','2.5','3.0','3.5','4.0','4.5','5. 0','5.5','6.0','7']


cgDCBar,citycolor,labels=labels,/vertical, title='Amplitude',rotate=45

;cgDCBar,citycolor,labels=labels,/
vertical,position=[0.9,0.15,0.90.0.9], title='Phase angle',rotate=45

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

end

I will be happy if you can help me to achieve this
many thanks
Zolile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Web Site Curator Needed
Next Topic: mpfit and analytical derivative debugging

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

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

Total time taken to generate the page: 0.00572 seconds