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

Re: IDLgrAxis text scaling



"Rick Towler" <rtowler@u.washington.edu> wrote in message
98421f$lh8$1@nntp6.u.washington.edu">news:98421f$lh8$1@nntp6.u.washington.edu...
> It is late in the day so beware of idiocity....
>
> I don't remember this being so difficult but I have some axes where i set
the
> range then set the appropriate x, y , and z coord_conv values.  My axes
come
> out fine but the labels are wacked, the characters are huge relative to
> anything else in the scene.  Shouldn't the axis object scale the text
> automatically according to the coord_conv values passed to the axis
object?
> Or do I really have to do the text the hard way?

RECOMPUTE_DIMENSIONS, my good man!

IDLgrText objects have a RECOMPUTE_DIMENSIONS property that determines when
dimensions are recomputed (oddly enough). Read the docs for the gory
details, but I believe what you want is for all the text objects associated
with your axis to have RECOMPUTE_DIMENSIONS=2, whereas the default is 0.

Setting this property when you create an object is easy enough, but an
IDLgrAxis normally creates the text object(s) for its tick labels behind
your back. So here is some code to reset RECOMPUTE_DIMENSIONS on all text
objects associated with an axis:

axis->GetProperty, TICKTEXT=oticktext, TITLE=otitle
if obj_valid(otitle) then $
    otitle->SetProperty, RECOMPUTE_DIMENSIONS=2
for i=0,n_elements(oticktext)-1 do $
    if obj_valid(oticktext[i]) then $
            oticktext[i]->SetProperty, RECOMPUTE_DIMENSIONS=2

---
Mark Hadfield
m.hadfield@niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research