From: Ryan M. <rm...@gm...> - 2010-03-30 19:37:56
|
2010/3/29 Rachel-Mikel_ArceJaeger <Rac...@hm...>: > Hello, > > This is my first time trying out this list, so please forgive me if I've doing this wrong. > > I'm trying to create a plot that has its origin in the upper-left hand corner, rather than the lower-left hand corner. I've discovered that I get the same effect if I do: > > plt.plot( xcoords, ycoords, 'ro' ) > plt.axis( [0, maxX, maxY, 0] ) You're looking for the set_ticks_position method on the xaxis (I've also tweaked setting the limits): plt.plot(xcoords, ycoords, 'ro') plt.xlim(0, maxX) plt.ylim(maxY, 0) ax = plt.gca() # Get current axes object ax.xaxis.set_ticks_position('top') plt.show() Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |