## matplotlib-users

 [Matplotlib-users] Axes control From: R. Padraic Springuel - 2006-09-16 16:12:06 ```I'm trying to make a plot where instead of the y-axis being oriented in the traditional sense (large numbers on top, small on bottom) it needs to be oriented in the reverse sense (small numbers on top, large on bottom). Now, my first thought on how to do this was the following: >>>plot(x,-y) >>>pos,lab = yticks() >>>yticks(pos,map(str,-array(pos))) This works, but if I've set a specific y-axis limit range before reversing the labeling, the yticks command messes that up. On the other hand, if I do the yticks command first, then I get the range I want, but the tick marks don't cover the whole range of the plot. Is there a better way of doing this, or some way to fix the above method to make it work? -- R. Padraic Springuel Teaching Assistant Department of Physics and Astronomy University of Maine Bennett 309 Office Hours: Wednesday 2-3pm ```
 Re: [Matplotlib-users] Axes control From: John Hunter - 2006-09-16 18:00:26 ```>>>>> "R" == R Padraic Springuel writes: R> I'm trying to make a plot where instead of the y-axis being R> oriented in the traditional sense (large numbers on top, small R> on bottom) it needs to be oriented in the reverse sense (small R> numbers on top, large on bottom). R> Now, my first thought on how to do this was the following: >>>> plot(x,-y) pos,lab = yticks() >>>> yticks(pos,map(str,-array(pos))) Just try setting ylim(ymax, ymin) instead of explicitly mucking with the ticks. Eg, http://matplotlib.sf.net/examples/invert_axes.py JDH ```