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

Home » Public Forums » archive » labeling my polarplot
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
labeling my polarplot [message #34229] Fri, 28 February 2003 03:29 Go to next message
hschlueter is currently offline  hschlueter
Messages: 1
Registered: February 2003
Junior Member
i want to label my polarplot in polarcoordinates. i tried it with
xyouts but its not working. the plot is a circle with a radiationfield
inside, thats with polar_contour. around of the field is the circle
with plot. the circle should be labelled with tickmarks (45, 90, 135,
180,...360 degree). can anybody help me with that? thanks for
responding.
helena


;Handle TrueColor displays:
;DEVICE, DECOMPOSED=0
;Load color table
;TEK_COLOR

set_plot, 'PS'
close,1
openr,1, 'ABB4-9_6.DAT'
readf,1, n_data
azimuth = fltarr(n_data)
zenith = fltarr(n_data)
wert = fltarr(n_data)

deg2rad = !pi/(-180.0)
rad2deg = 1.0/deg2rad

tripel = fltarr(3)
for i_data = 0, n_data - 1 do begin
readf,1, tripel
zenith(i_data) = (tripel(0)*deg2rad)
azimuth(i_data) = (tripel(1)*deg2rad)-!PI/2
wert(i_data) = tripel(2)
endfor

n_levels = 20
c_labels = fltarr(20)
for i = 0, n_levels - 1, 2 do c_labels(i) = 1

levels = min(wert) + findgen(n_levels)/(n_levels - 1)*(max(wert) -
min(wert))
c_color = findgen(n_levels)/n_levels*255

xyouts ,2,2, 'This is text',alignment=-5.0,/device ;just tried out the
example

POLAR_CONTOUR, $
wert, azimuth, zenith, $
TITLE = 'Diffuse Radiation Field', $
/ISOTROPIC, $
xstyle = 4, ystyle = 4, $ ; Achsen nicht zeigen
LEVELS = levels, C_LABELS = c_labels
;/FILL, c_color=c_color

;XYOUTS, 50, 10, 'This is text', /DEVICE

r_frame=fltarr(361) ; ##### Frame, Tickes, Labels, ...
phi_frame=fltarr(361)
for i = 0,360 do begin
r_frame(i) = !PI/2
phi_frame(i) = i*deg2rad
endfor
plot, /polar, r_frame, phi_frame, xstyle = 4, ystyle = 4, $
/noerase, linestyle = 1, /isotropic


;XYOUTS, 50, 10, 'This is text', /DEVICE

;xpos=fltarr(9)
;ypos=fltarr(9)

;for i = 0,360,45 do begin
; xpos(i/45) = !PI/2 + 0.2
; ypos(i/45) = i*deg2rad
;endfor
;plot, /polar, xpos, ypos, xstyle = 4 ,ystyle = 4, /noerase, $
; linestyle = 1, /isotropic

;oplot, [-!PI/2, !PI/2], [0,0], linestyle = 2
;oplot;Handle TrueColor displays:

device, /close_file
set_plot, 'x'

end
Re: labeling my polarplot [message #34295 is a reply to message #34229] Sat, 01 March 2003 09:21 Go to previous message
wmconnolley is currently offline  wmconnolley
Messages: 106
Registered: November 2000
Senior Member
David Fanning <david@dfanning.com> wrote:
> Did I mention that I was unemployed (in case anybody,
> like, needs some work done or something).

I fear I can't afford you... ;-)

> Anyway,
> I fixed this code up to be a little more general
> and I wrote an article about the process, including
> a little picture that shows why ISOTROPIC doesn't
> work.

Is an alternative to use mapping, with the polar stereographic
projection? Thats always looked fairly isotropic to me, though
I admit I haven't checked tooooo closely.

-W.

--
William M Connolley | wmc@bas.ac.uk | http://www.nerc-bas.ac.uk/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
I'm a .signature virus! copy me into your .signature file & help me spread!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: current directory
Next Topic: WTB: Used documentation for IDL, PV-WAVE.

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

Current Time: Wed Oct 08 18:39:18 PDT 2025

Total time taken to generate the page: 0.00565 seconds