Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Prepare for merging SubplotBase into AxesBase.#18564
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Axes3D no longer adds itself to figure | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
New `.Axes3D` objects previously added themselves to figures when they were | ||
created, which lead to them being added twice if | ||
``fig.add_subplot(111, projection='3d')`` was called. Now ``ax = Axes3d(fig)`` | ||
will need to be explicitly added to the figure with ``fig.add_axes(ax)``, as | ||
also needs to be done for normal `.axes.Axes`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Subplot-related attributes and methods | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Some ``SubplotBase`` attributes have been deprecated and/or moved to | ||
`.SubplotSpec`: ``get_geometry`` (use `.SubplotBase.get_subplotspec` | ||
instead), ``change_geometry`` (use `.SubplotBase.set_subplotspec` instead), | ||
``is_first_row``, ``is_last_row``, ``is_first_col``, ``is_last_col`` (use the | ||
corresponding methods on the `.SubplotSpec` instance instead), ``figbox`` (use | ||
``ax.get_subplotspec().get_geometry(ax.figure)`` instead to recompute the | ||
geometry, or ``ax.get_position()`` to read its current value), ``numRows``, | ||
``numCols`` (use the ``nrows`` and ``ncols`` attribute on the `.GridSpec` | ||
instead). | ||
Axes constructor | ||
~~~~~~~~~~~~~~~~ | ||
Parameters of the Axes constructor other than *fig* and *rect* will become | ||
keyword-only in a future version. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -170,7 +170,7 @@ def test_gca(): | ||
# Changing the projection will throw a warning | ||
assert fig.gca(polar=True) is not ax3 | ||
assert fig.gca(polar=True) is not ax2 | ||
assert fig.gca().get_subplotspec().get_geometry() == (1, 1,0, 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. should you check that the subplot spec is 1, 1, 1? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I think that's an equivalent check? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Ooops, I see. You are indeed correct... | ||
fig.sca(ax1) | ||
assert fig.gca(projection='rectilinear') is ax1 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -131,8 +131,6 @@ def __init__( | ||
pseudo_bbox = self.transLimits.inverted().transform([(0, 0), (1, 1)]) | ||
self._pseudo_w, self._pseudo_h = pseudo_bbox[1] - pseudo_bbox[0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Is this going to break basically every usage of 3D axes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. No, only those using the rather unidiomatic | ||
# mplot3d currently manages its own spines and needs these turned off | ||
# for bounding box calculations | ||
for k in self.spines.keys(): | ||