[Date Prev][Date Next][Index][Thread]
[SGT Mail Archive]
[SGT Main Page]
Re: time graph, please help!!!
Tim,
1) you can
use SimplePoint with the PointCollection or unless you really need labels
for each point just use the LineAttribute.MARK style for the
LineAttribute. Using JPlotLayout you can add data with a
pre-defined LineAttribute. i.e.
LineAttribute.setStyle(LineAttribute.MARK).
If you
want to use the SimplePoint then combine them using the PointCollection
which inherits from Vector and the PointAttribute classes.
2) At this
time the JPlotLayout doesn't support line plots with area or contour
plots. You can combine these but you'll have to build it up from
the basic sgt classes. A couple of the demos build up a plot from
the basics. Basically, you use multiple Layer objects with the
first layer containing the area plot (so that it is drawn first).
If you create your own plot this way you will also need to implement
zooming. See the code for JPlotLayout for how zooming can be
handled.
Don
At 09:50 AM 3/18/2002 -0800, Lai, Timothy Z wrote:
SGT users,
I am plotting a time vs space graph, very similar to the JTimeSeriesDemo graph. I would really appreciate your help on these questions.
1) How do I plot a point on this time graph? I tried the SimplePoint class, but this class doesn't allow me to specify time (GeoDate) coordinate. I noticed that there is a TimePoint class that allows both space and time coordinates, but how do I plot this point? Or more specifically, how do I add this point to the JPlotLayout?
2) How do I add an area plot to this graph? Say, I'd like to draw a shaded, rectangular block on this time vs. space graph. This block gets RESIZED automatically as the user zooms in/out. Also, this block is SELECTABLE.
Thank you in advance.
Best regards,
Tim
// t_lai
/*
"The brain is a wonderful organ. It starts the moment you get up and doesn't stop until you get into the office."
-- Robert Frost
*/
==================================================
Donald W. Denbo dwd@pmel.noaa.gov
Ph: (206) 526-4487 Fax: (206) 526-6744
Collaborative tools: http://www.epic.noaa.gov/collab/
Netcdf Browser: http://www.epic.noaa.gov/java/ncBrowse
Scientific Java Graphics: http://www.epic.noaa.gov/java/sgt
EPIC Oceangraphic Data Management: http://www.pmel.noaa.gov/epic
==================================================