Re: Screen Based AxisScales

Just some follow-up on this:

Don Murray wrote:

I'm trying to use the screen based axis scales (see Test42 in
the visad examples) and have run into a couple of things
that are problematic in their use.

- the YAxis gets put too far off to the left that my
label gets cut off the screen when my tick labels are
4 or more chars (e.g. 1000).  This is similar to the
issue described at:

but that fix is in the distribution, but did not
completely fix the problem.

A workaround is to set the label size a little smaller.  The
default size is 12, using 10 shows my labels.  Not an optimum
solution, but it works.

- ideally, I'd like the scales to be snapped to the
box's original position such the corner of the two scales'
intersection lines up with the box's lower left corner (
when snapToBox is true).

Positioning of the axes is handled down in DisplayRendererJ3D.
At some point, it would be good to allow the user to set
the offset.

- lastly, I'd like to have my clipping happen at the
axis scale position, not the bounds of the box.

I do this by listenting for projection changes, figuring
out where the scales are located in VisAD space and
then set the clipping bounds accordingly.

Also, I made a couple of improvements to the AxisScale
class in the latest VisAD release:

- grid lines - you can now draw grid lines at the major
tick points by calling setGridLinesVisible(true) on
a particular axis scale.
- labelling both sides - you can now have the label on
both sides of the box by calling setLabelBothSides(true).

Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
        "Time makes everyone interesting, even YOU!"

  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: