Closed
Description
matplotlib
1.5.1 on Linux, installed from binary package, both on Python 3.5.2 and 2.7.12.
Here is the code:
import pylab
f, axes = pylab.subplots(2, sharex=True, sharey=True)
for ax in axes:
ax.plot(range(100))
for ax in axes:
print([x.get_text() for x in ax.get_xticklabels()])
print('----')
pylab.savefig('/tmp/tempfig.png')
for ax in axes:
print([x.get_text() for x in ax.get_xticklabels()])
The output is:
['', '', '', '', '', '']
['', '', '', '', '', '']
----
['0', '20', '40', '60', '80', '100']
['0', '20', '40', '60', '80', '100']
If I comment out the call to savefig()
, I get
['', '', '', '', '', '']
['', '', '', '', '', '']
----
['', '', '', '', '', '']
['', '', '', '', '', '']
The tick labels (which I am trying to get) are seen in the figure:
Is this expected?