Hi everyone,

 I just detected some kind of problem when inverting axes while plotting
data with errobars. If I try reversing the y-axis by either setting the
reverse flag to 1  or by changing the minimum and maximum ranges, the error
I get is the same:

    raise ValueError("inverse range")
 ValueError: inverse range

 Is there any way to fix this? Here is some code so you can reproduce the
problem:

from pylab import *
from pyx import *

x = arange(10)
y = arange(10)
yerr = ones(10)
#### PLOT OPTIONS ######
unit.set(xscale = 1.5)
legend_text_size = -1
min_x = 0.0#000.
max_x = 10.0#0.
min_y=None
max_y=None
xaxis = r'Xaxis'
yaxis = r'Yaxis'
legend_pos = 'tr'
# Plot only phased with LS:
c = canvas.canvas()
g = c.insert(graph.graphxy(height=8,width=20,
key=graph.key.key(pos=legend_pos,vinside=0,columns=2,textattrs=[text.size(legend_text_size)]),\
       x = graph.axis.linear(min=min_x,max=max_x,title = xaxis),\
       y = graph.axis.linear(min=max_y,max=min_y,reverse=1,title = yaxis)))

g.plot(graph.data.values(x=x, y=y, dy=yerr, title='Data'),\
       styles = [graph.style.symbol(graph.style.symbol.circle,size=0.2,\

 symbolattrs=[deco.filled,deco.stroked([color.rgb.black]),color.rgb.red]), \
       graph.style.errorbar()])

g.writePDFfile('theplot')


-- 
Néstor Espinoza
PhD Student in Astrophysics
Instituto de Astrofísica
Pontificia Universidad Catolica de Chile
Phone (office): (+562) 3547052
Web: http://www.astro.puc.cl/~nespino
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to