Flexible IDLgrAxes with nicely auto-rendered text labels? [message #64554] |
Tue, 06 January 2009 07:32 |
M. Katz
Messages: 69 Registered: May 2005
|
Member |
|
|
I've been working on an fairly simple compound graphics object that
handles two IDLgrAxes (X,Y) and any number of IDLgrPlots. My goal is
to create something where the plot values can be changed freely and
the axes respond by stretching or contracting to accommodate the data
ranges. Not a big deal.
The problem has been the text used to auto-label the tickmark values--
its size constantly gets mangled by the changing axes ranges. For the
XY axes titles I use an IDLgrText object with RECOMPUTE_DIMENSIONS=1
or 2 and it works perfectly. The labels are always readable and sized
consistently.
I would love to leave the axes tickmark text keywords undefined, so
IDL will choose the proper tickmark values for the object. However,
doing that brings on this text sizing problem.
So far, I can see two paths that I don't like because both require
that you know and fix the number of major tick marks. (A) For the
TICKTEXT, predefine an objarr(N) of IDLgrText objects with
RECOMPUTE_DIMENSIONS set. (B) Predefine a single IDLgrText object with
a strarr(N) as the value.
A third path is to continually destroy and re-create the IDLgrAxis
objects, and I like that even less.
Does anyone have an elegant suggestion about how to make IDLgrAxes
keep up with adjustable plot data ranges and still maintain nice auto-
generated, well-sized text?
Thanks!
M. Katz
|
|
|