-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Closed as not planned
Copy link
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action
Milestone
Description
Consider an axis with equal aspect ratio
from matplotlib import pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(111, aspect='equal')
ax1.grid()
plt.show()
Adding a parasitic axis with twinx()
causes the plot to completely ignore aspect='equal'
from matplotlib import pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(111, aspect='equal')
ax1.grid()
ax2 = ax1.twinx()
plt.show()
Creating the primary axis with the keyword argument adjustable='box-forced'
causes it to obey aspect='equal'
but the parasitic axis does not.
from matplotlib import pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(111, adjustable='box-forced', aspect='equal')
ax1.grid()
ax2 = ax1.twinx()
plt.show()
Interestingly, everything works if the primary axis is created with host_subplot
(note adjustable='box-forced'
is still required). However, it seems to be prone to a similar issue to #7648 if figure.autolayout
is set
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import host_subplot
fig = plt.figure()
ax1 = host_subplot(111, adjustable='box-forced', aspect='equal')
ax1.grid()
ax2 = ax1.twinx()
plt.show()
Platform: Windows 7
matplotlib: 1.5.3
python: 2.7.12
amueller
Metadata
Metadata
Assignees
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action