[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line graph problems
Martin Schultz wrote:
> Paul van Delst wrote:
> > Paul van Delst wrote:
> > >
> > > maxval = ABS( MIN( xdata ) ) > MAX( xdata )
> > ^
> > oops. Missing ")" above in previous post
> This line (the ">" to be exact) gave me another idea:
> Since you can/should explicitely specify your axis labels with the
> beforementioned ESRG routine anyway,
I disagree about that. Mostly because I'm lazy (I *really* dislike having to use
tremendously verbose code - full of stuff like determining the width of characters and
then lining stuff up by applying fractions of said width etc. - simply to label plot axes
and/or tick marks)
> you could do something like:
> labels = [ string(findgen(6),format='(f6.1)'),
> string(max(data),format='(f20.1)') ]
> labels = StrTrim(labels,2)
> axgap,..., ; use the labels here
> oplot, x, data < 8. ; where the value of 8. is just a guess and
> would have to be determined.
> This wouldn't do exactly what you want, but it would "line up" all
> points above the threshold in the upper plot area. So, better, would
> be to scale only the data above the gap. E.g.:
> tmpdata = data
> wbig = Where(data gt 6., cnt) ; assume your threshold is 6
> IF cnt GT 0 THEN tmpdata[wbig] = (tmpdata[wbig]/10.)+6.
> ... or something similar. Hope you get the idea.
Yeah, but recently I have come to the conclusion that IDL is not mature enough to allow me
absolute control in a simple, intuitive way of plot properties (note that the qualifier
"simple" eliminates OG :o) as opposed to some other proprietary plotting package (like,
for e.g., Grapher or Surfer).
However, IDL has always allowed me dictatorial control over my data (totally unlike, for
e.g., Grapher or Surfer) and this is, after all, one of the two reasons I use IDL - data
"malleability" :o) the other being visualisation. This leads to my (personal) path of
least resistance of data scaling. All the axis/tick mark/interval/label stuff I leave to
IDL cause I don't care about that stuff (i.e. it shouldn't take more than about a minute
or two to get my plot looking the way I want it.)
Thanks for the tips though. As always, they're useful and illuminating.
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
firstname.lastname@example.org Alexander Pope.