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 set, you specify the bottom, 
then the top (or the right, then the left), not min and then max.

Eric

Daehyok Shin wrote:
> 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 by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to