|
From: Chad P. <par...@gm...> - 2013-04-23 16:52:45
|
Hi all- I've been working on a plot that puts the bottom and right spines at zero (adapting some code from the example at http://matplotlib.org/examples/pylab_examples/spine_placement_demo.html) , and I've discovered that setting the position of the right spine to 'zero' seems to locate it at x=1. Is this a bug? Or is there something that I'm missing? Thanks, --Chad Here's an example that demonstrates the behavior: import matplotlib.pyplot as plt f=plt.figure(1) ax=plt.subplot(111) ax.spines['left'].set_color('none') ax.spines['top'].set_color('none') ax.spines['right'].set_position('zero') ax.spines['bottom'].set_position('zero') ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('right') ax.set_xlim([-2,2]) ax.set_ylim([-2,2]) plt.show() |