Reverse y-axis?

Hi

I need to plot some data vs depth. In stead of giving depths as
0,-1000,-2000, I want to give the depths as 0,1000,2000 but when plotting
the data goes downwards (as if they had been negative). Can I get the
y-axis to reverse so it goes downwards and not upwards?

If using the OO interface:

axes.invert_yaxis()

or

axes.set_ylim(2000, 0) # note the larger value first

or with the pylab interface:

ylim(2000, 0)

Mike

ยทยทยท

On 06/25/2010 07:41 AM, Preben Randhol wrote:

Hi

I need to plot some data vs depth. In stead of giving depths as
0,-1000,-2000, I want to give the depths as 0,1000,2000 but when plotting
the data goes downwards (as if they had been negative). Can I get the
y-axis to reverse so it goes downwards and not upwards?
   

--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA