Re: Still trying to draw histograms in VisAD...

Hi Frank...

It looks to me like the rendering of your lines is being done very indirectly, and it looks like the placement of the 'shape' is always fixed at the "visad box" coordinate of y=0 -- Bill will have to comment on that.

Unless you're using this project as a way to learn a lot about VisAD, I might suggest a far simpler approach: use the drawLine() method available in (You could, of course, also use the 'graph.histogram()' method, but drawLine() gives you a little more control). I offer this modest example that will draw your histogram-type of display:

from visad.python.JPythonMethods import *
import subs

def main():

  maps = subs.makeMaps("Day", "x", "Precipitation", "y")

  Nday = 31

  disp = subs.makeDisplay( maps )

  from random import *
  for x in xrange(Nday):
    y = .1 * random()
    if x == 0: y = 1.0
    subs.drawLine(disp, ((x,x),(y,0)), color='green', width=4)


  from java.awt import Font
  setAxesScalesFont(maps, Font("Monospaced", Font.PLAIN, 22))


if __name__ == "__main__":

Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Cooperative Institute for Meteorological Satellite Studies
Phone/VoiceMail: 608.262.2759