Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: Got any tips for drawing 2d graphs with error bars, symbols,etc?

Hi Frank,

> I'm trying to create a two-dimensional display of some mass-spectrometry
> results (observed and theoretical). For my particular work right now, that
> means I'd like to create the following for each data point (x,y):
> 
>          1. a vertical line that runs from (x,0) up to (x,y)
>          2. a point somewhere along that vertical line (probably at the
> top), indicating the mean value of the signal y for that x-value.
>          3. two (or more) horizontal bars, one above the mean point, one
> below, to indicate some kind of statistics (standard deviation, percentile
> score, ... - basically some kind of error bar)
> 
>  From Ugo's excellent tutorial, I can see how to put in the point (in 2.
> above) along with the lines. However, it's not clear how I can put in the
> vertical lines. I guess I can fulfill 1. and 3. by using subs.drawLine()
> function to draw the lines item by item. I'm just wondering if there isn't
> a more "built-in" way of doing this for the set as a whole.

See Ugo's message about making bar graphs at:

  http://www.unidata.ucar.edu/glimpse/visad-list/1107

You may be able to translate this logic into VisAD-Python.

> Also, if I wanted to use a symbol for the point-markers in 2., is there any
> way for me to do that? Instead of just a dot, could I put in a 'star' (*),
> a cross (+) or some other textual symbol easily?

The Shape logic may help you do this. This logic is accessible
from VisAD-Python as described at:

  http://www.unidata.ucar.edu/glimpse/visad-list/3183

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


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