[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Polar Plots



I have written a package for analysing data of form profiles i.e.
straightness and roundness profiles. For the roundness case extended polar
plotting is needed. I don't think that it can be used without modification.
But the principle might be of interest.

Basically it works like this:

A plot center is defined and the data is converted to carthesian coordinates.
After that a command like the following is executed:

winkel = array of angular steps
rawdat = polar data
auswfakt = scaling factor
...
rect_dat = cv_coord (from_pol=transpose([[winkel],[rawdat* auswfakt,
rawdat[0]* auswfakt]]),/to_rect)
radius = fltarr(N_elements(winkel)) + plotradius
radius = cv_coord (from_pol=transpose([[winkel],[radius]]),/to_rect)
rect_dat = rect_dat + radius
...
rect_dat[0,*] = rect_dat[0,*] + plot_center[0]
rect_dat[1,*] = rect_dat[1,*] + plot_center[1]
..
plots, noclip=0, rect_dat,/device


For circular axes the following is performed: A max. and min. radius is
defined. Coordinates of the vectors for the axes are calculated.

zwinkel = array of angular steps
LinCnt = Counter for several plot circles
add25 = a small value

 maxradius = fltarr(N_elements(zwinkel)) + maxrad[LinCnt]-add25
 maxradius = cv_coord (from_pol=transpose([[zwinkel],[maxradius]]),/to_rect)
 maxradius[0,*] = maxradius[0,*] + plot_mitte[0]
 maxradius[1,*] = maxradius[1,*] + plot_mitte[1]
 minradius = fltarr(N_elements(zwinkel)) + minrad[LinCnt]+add25
 minradius = cv_coord (from_pol=transpose([[zwinkel],[minradius]]),/to_rect)
 minradius[0,*] = minradius[0,*] + plot_mitte[0]
 minradius[1,*] = minradius[1,*] + plot_mitte[1]

After that everything is plotted in a single command:

plots, noclip=0, rect_dat,/device


Otto




Chris Bull schrieb:

> Hi all,
>
> I was just wondering if anyone had extended (and is willing to share) the
> IDL basic polar plot routine to include useful things like circular axes
> etc (before I slave over doing it myself! :*)
>
> Regards
>
> Chris Bull
begin:vcard 
n:Jusko;Otto 
tel;fax:+49-531-592-5305
tel;work:+49-531-592-5310
x-mozilla-html:FALSE
org:PTB
adr:;;Bundesallee 100;Braunschweig;;D-38116;Germany
version:2.1
email;internet:Otto.Jusko@ptb.de
title:Dr.rer.nat.
x-mozilla-cpt:;23080
fn:Otto  Jusko
end:vcard