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? > 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 -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users