Hello,
There is no explicit support for the "set label" command in Gnuplot.py,
but you can easily do this using the ability to pass arbitrary commands
to gnuplot:
for (x,y,code) in data:
g('set label "%s" at %g,%g' % (code, x+xoffset, y+yoffset))
where xoffset and yoffset are chosen so that the label does not
overwrite the point itself.
Hope this helps,
Michael
Martin Peters wrote:
> I am trying to label my plots automatically through scripts -- ( very
> large data-sets, Ex**l doesn't like it)
[...]
> g.label(("test label") at 5,5) <---- How do you automate this
> line?
[...]
> DATA:
> | x | y | code |
> |--------------|--------|
> | 1 | 0.50 | A12 |
> | 2 | 0.75 | ZXC |
> | 3 | 0.45 | GFS |
> | 4 | 0.23 | AER |
> | 5 | 0.12 | ASD |
> | 6 | 0.90 | IOP |
> |-----------------------|
> How do you make a graph, and label each of the 6 points with the, x
> and y value, or by its code?
--
Michael Haggerty
mh...@al...
|