|
From: Gökhan S. <gok...@gm...> - 2010-04-22 17:29:01
|
Hello, Consider my simple test case: import matplotlib.pyplot as plt fp = plt.figure() ax1 = fp.add_subplot(4,1,1) ax1.plot(range(10)) ax2 = fp.add_subplot(4,1,2) ax2.plot(range(10)) ax1.xaxis.set_major_locator (plt.NullLocator ()) ax3 = fp.add_subplot(4,1,3) ax3.plot(range(10)) # Can't turn off ax3.xaxis.set_major_locator (plt.NullLocator ()) ax4 = fp.add_subplot(4,1,4, sharex=ax3) ax4.plot(range(10)) # Turn-off both ax3 and ax4 #ax3.xaxis.set_major_locator (plt.NullLocator ()) plt.show() When I share x-axis in between two plots I can't turn-off one axis' major ticks. Depends on the location of the function call it either turn nothing or all. Is it intended or a mal-functioning? (Shared axis is for my screen view, I can live without it by turning off sharex option since it won't make any difference for the final saved figures.) Thanks. -- Gökhan |