Hi,
On 27.01.05, Andrea Riciputi wrote:
> I have a problem that I've not been able to address, hope you can help
> me. Suppose I want to plot a data series and I don't know what the
> yvalues will be, suppose also that I want to write any text on the
> plot after the data, let's say on the rightupper corner. I'll try
> something like this:
>
> xAxis = pyx.graph.axes.lin(min = x_min, max = x_max)
> yAxis = pyx.graph.axes.lin()
>
> h = pyx.graph.graphxy(width = 10, height = 10, x = xAxis, y = yAxis)
>
> h.plot(pyx.graph.data.list(dataSet, x = 1, y = 2))
>
> Now I try to write the label, but (yAxis.min, yAxis.max) == (None,
> None), and I don't now how to find the coordinates of the upperright
> (or whatever) corner. Obviously I'm missing something, could you give
> me some hints?
I do not fully understand, what (yAxis.min, yAxis.max) == (None, None)
is supposed to do. But I think you just want an easy way to access
positions in the graph. For that you can use the graphs pos() and
vpos() methods. (Note, that the pos() method can be only be used after
the dolayout() method was called when the axis ranges are adjusted
automatically.) But to get the upper right corner, you can just use
x, y = h.vpos(1, 1) ...
I'm not quite sure whether I totally misunderstood your question, so
please, ask again, when I was pointing towards something totally
uninteresting to you ...
André

by _ _ _ Dr. André Wobst
/ \ \ / ) wobsta@..., http://www.wobsta.de/
/ _ \ \/\/ / PyX  High quality PostScript figures with Python & TeX
(_/ \_)_/\_/ visit http://pyx.sourceforge.net/
