Skip to content

Commit

Permalink
ignore equal_aspect for 3d axes
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Dec 12, 2019
1 parent e3d2312 commit d72b449
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autofig/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,11 @@ def draw(self, ax=None, i=None, calls=None,
aspect = 'auto'
adjustable = 'box'

ax.set_aspect(aspect=aspect, adjustable=adjustable)
axes_3d = isinstance(ax, Axes3D)
if not axes_3d:
ax.set_aspect(aspect=aspect, adjustable=adjustable)
elif self.equal_aspect:
print("WARNING: equal_aspect not supported for 3d axes, ignoring")

# return_calls = []
self._colorcycler.clear_tmp()
Expand All @@ -1245,7 +1249,6 @@ def draw(self, ax=None, i=None, calls=None,
if draw_title and self.title is not None:
ax.set_title(self.title)

axes_3d = isinstance(ax, Axes3D)

ax.set_xlabel(self.x.label_with_units)
ax.set_ylabel(self.y.label_with_units)
Expand Down

0 comments on commit d72b449

Please sign in to comment.