VisAD doesn't have a standard bar chart plot, or a pie
chart, or other standard business graphics. Rather, it
provides a programming library for building various types
on interactive graphics and analyses for numerical data.
It is more oriented around numerical representations of
continuous data, but because those representations are
discrete, it can deal with discrete data too.
My earlier message about mapping to Shape was an attempt
to explain how you might use VisAD to define a bar chart
based on my misunderstanding of your words about midpoint.
You're right that the way you explained it in your second
message, computing the new "mid" values is unnecessary.
Instead, you'd map height (in P2_03.java) to both YAxis
and Shape. You'd still need to set up a sampling Set for
the ShapeControl, and it would be a little tricky to make
the scales match between the mappings to YAxis and Shape.
In fact, Shape is a bit tricky and is probably not the
first thing you should tackle in VisAD. You could look at
how it is used in the Test46.java and Test47.java programs
in visad/examples, as well as the discussion of Shape in
the Developers Guide.
You got the ClassCastException because getControl() will
only return a ShapeControl when applied to a ScalarMap to
Display.Shape.
The sample Set for Shape tells it how to discretely sample
numerical values in your Field for looking up discrete
Shapes.
Good luck,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706
hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html