NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi- m huang wrote:
Hi Sorry to pile on so many questions. I appreciate people, particularly Bill, to take time to answer. I will replythe answers after finish this round.I would like to know in X-Y style 2D plots 1) Can VisAD set line styles (continuous, dotted, dashed, dotted-dashed...)? If yes, how do I find out existing choices of line styles.
You can call GraphicsModeControl.setLineStyle() to set these globally, or you can add a ConstantMap with your DataReference to Display.LineStyle. This is a pretty recent addition so it is not in the tutorials/docs yet. See javadoc for GraphicsModeControl for available types.
2) Is there an *existing* set of shapes for the user to use as data points in the plot? I see there is support for creating any shapes and there is an example as how to do this for those who want to make a shape from scratch. I have tinkered with the tutorial example P2_06 and tried to map the example realTypes into Display.Shape, but I don't see anything showing up.
There is no existing one other than those in visad.meteorology.WeatherSymbols. There are some defined int the jython stuff. Tom W. could point you to those. We have some in our IDV, and it would be useful to move these into core visad at some point.
3) Does visAD support legend of data points and line types? Or the user need to make a legend from scratch?
You would need to create this. The Australian Bureau of Meteorology has done some work on this I think.
4) how to change the plotting box aspect ratio without changing other components? The Display.setProjectionControl() "streches" or "compresses" all component being drawn. This is not what I ask for. What I ask for for example, is how to change the aspect of the box without changing the width of the ticks, data curves, font and any other thing on the plot.
For graphs that use Display.XAxis, Display.YAxis and Display.ZAxis, use ProjectionControl.setAspectCartesian().
5) If the user want to change the default mouse behavior in VisAD plots, generally how is this done?
See the javadoc for MouseHelper.setFunctionMap(). Use DisplayRenderer.getMouseBehavior().getMouseHelper(). Also, as you try to spin up on VisAD, don't forget to search the list archives for answers to some of your questions: http://www.unidata.ucar.edu/glimpsedocs/ghvisad.html A search on "mouse button" turned up how to do 5, a search on "line style" turned up the answer to 1, a search for "aspect ratio" turned up the answer to 4. I would chime in on why you should use VisAD, but am sorely pressed for time with an upcoming conference (AGU) to prepare for where I'll be highlighting Unidata's IDV which is built on VisAD. If VisAD does not have what you need, you can add it yourself, or fund SSEC to make enhancements (we do both). Don ************************************************************* Don Murray UCAR Unidata Program dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm *************************************************************
visad
archives: