Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Description
Python Version 2.7.4
matplotlib version: 1.1.1
Setting the location of the top and right spines to X is locating them at X +1. The left and bottom spines are placed as expected.
I posted this to the users list and it was verified by Goyogoyodiaz@gmail.com.
The following code demonstrates the error:
importmatplotlib.pyplotaspltf=plt.figure(1)f.clf()ax=plt.subplot(111)# spine is located at x = -1.5ax.spines['left'].set_position(('data',-1.5))# spine should be located at y = 0.5 but is placed at y = 1.5ax.spines['top'].set_position(('data',0.5))# spine should be located at x = -0.5 but is placed at x = +0.5ax.spines['right'].set_position(('data',-0.5))# spine is placed at y = 0.ax.spines['bottom'].set_position('zero')ax.set_xlim([-2,2])ax.set_ylim([-2,2])plt.show()