Skip to content

Fixing osx makefile #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: Get autofmt_xdate to work when used with twinx
  • Loading branch information
scottza authored and fgb committed Feb 23, 2011
commit 1ab26de1a61a27d166bbeb5bd71fce01cf3e4562
30 changes: 11 additions & 19 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,25 +312,17 @@ def autofmt_xdate(self, bottom=0.2, rotation=30, ha='right'):
*ha*
the horizontal alignment of the xticklabels
"""
allsubplots = np.alltrue([hasattr(ax, 'is_last_row') for ax in self.axes])
if len(self.axes)==1:
for label in ax.get_xticklabels():
label.set_ha(ha)
label.set_rotation(rotation)
else:
if allsubplots:
for ax in self.get_axes():
if ax.is_last_row():
for label in ax.get_xticklabels():
label.set_ha(ha)
label.set_rotation(rotation)
else:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.set_xlabel('')

if allsubplots:
self.subplots_adjust(bottom=bottom)
for ax in self.get_axes():
if hasattr(ax, 'is_last_row') and ax.is_last_row():
for label in ax.get_xticklabels():
label.set_ha(ha)
label.set_rotation(rotation)
else:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.set_xlabel('')

self.subplots_adjust(bottom=bottom)

def get_children(self):
'get a list of artists contained in the figure'
Expand Down