VisADLineArray() to make histogram bars - why do they float?


I'm back with another question on using VisADLineArray to make histogram bars. In previous episodes (about a month back), with help from Bill, Tom and Ugo, I've created a vertical bar, attached it to a vertical ScaleMap, so that its length is determined by the variable on that axis. What I don't understand is how this length is determined: if I have a little line (in Jython)

# Idea from Ugo
pBarMap = ScalarMap(intensity, DisplayShape)
pBarScaleMap = ScalarMap(intensity, DisplayShapeScale)

pBars = VisADLineArray()
pBars.vertexCount = 2
x = 1.0
pBars.coordinates = [ 0.0, 0.0, 0.0,    0.0, x, 0.0]
pBarScaleMap.setRange(0.0, x/2.0) # Scale as recommended by Bill H.

I would expect that when this line is scaled, the first vertex should remain unchanged at [0.0, 0.0, 0.0]. Instead, there appears to be some vertical translation as well as scaling, so that the scaled lines no longer begin at the horizontal axis, but instead float at a height related to the intensity value to which they are mapped - they not only get bigger as the intensity increases, they also "float" higher.

I'd would *really* appreciated any insight you guys can offer.



PhD, Computational Biologist,
Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA.
Tel: 617-432-3555 Fax: 617-432-3557

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