Re: [Matplotlib-users] How to reverse the direction of an axis?

2008-01-29 Thread Eric Firing
In [1]:plot(arange(10)) Out[1]:[matplotlib.lines.Line2D object at 0x908ee0c] In [2]:ax = gca() In [3]:ax.set_ylim(ax.get_ylim()[::-1]) Out[3]:(9.0, 0.0) In [4]:draw() In [5]: The method in line 3 should work on new and old versions of matplotlib. The basic idea is that when axis limits are

[Matplotlib-users] How to reverse the direction of an axis?

2008-01-29 Thread Daehyok Shin
I like to reverse the direction of y axis - from top to bottom. Anyone to help me? I initially thought it may be easy, but it turned out much harder to find THE SOLUTION. Thanks. Daehyok Shin - This SF.net email is sponsored

Re: [Matplotlib-users] How to reverse the direction of an axis?

2008-01-29 Thread Eric Firing
Daehyok Shin wrote: Thanks for your help. I didn't know set_ylim can the reversed limits. I am wondering if it is not a good idea to introduce a method such as axis.set_direction(). Or, axis.set_origin(). There are Axes methods invert_xaxis() and invert_yaxis() in recent versions of mpl; I