Re: probability scale on 2D line plot? [message #13798] |
Fri, 11 December 1998 00:00  |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
Embarassed by my previous, useless post, I'll duel with the Send button
again.
I guess you're really after something similar to IDL's log scaling in
functionality, but with the remapping done according to a cumulative
normal distribution. You can't do this with a simple switch in the
PLOT call (as with log scaling); you have to do it by steam power...
Say you have a vector DAT(N) that you want to plot stretched in this
way. You also have the mean DAV and the standard deviation DSD of the
underlying distribution. (Maybe you just calculate these from DAT.)
First you have to decide how much to stretch - how many standard
deviations to cover. Say you pick 3.
The stretched data is: DAT1=GAUSSINT( (DAT-DAV)/(3.0*DSD) ).
Then you just use DAT1 instead of DAT in the plot call.
However, the plot's axis labels would now be "wrong". You could come
right by doing something like this:
NT=6 ;6 ticks, say
TVAL=( FINDGEN(NT) * ((6*DSD)/(NT-1)) ) - 3*DSD ;over -3SD..3SD
TVAL1=GAUSSINT( (TVAL-DAV)/(3.0*DSD) ) ;stretch them
Then in the plot call:
PLOT, DAT1, ... YTICKS=NT-1, YTICKV=TVAL1, YTICKNAMES=STRTRIM(TVAL,2)
If you wanted "correct" DATA cursor readouts from your plot, you'd have
to handle their *inverse* mapping.
Peter Mason
|
|
|