add_subplot(..., axes_class=...) for more idiomatic mpl_toolkits usage.#18573
add_subplot(..., axes_class=...) for more idiomatic mpl_toolkits usage.#18573jklymak merged 1 commit intomatplotlib:masterfrom
Conversation
|
|
||
| # axes for colorbar | ||
| ax_cb = Axes(fig, divider.get_position()) | ||
| # (the label prevents Axes.add_axes from incorrectly believing that the two |
| projection_class, extra_kwargs = projection._as_mpl_axes() | ||
| kwargs.update(**extra_kwargs) | ||
| "Cannot combine 'axes_class' and 'projection' or 'polar'") | ||
| projection_class = axes_class |
There was a problem hiding this comment.
You and I have crossing PRs, so its pretty important for my rebases that you have tests if possible
There was a problem hiding this comment.
sorry about that, added a test
There was a problem hiding this comment.
This line still doesn't have a test according to codecov. I can probably be careful in my rebase, but....
There was a problem hiding this comment.
hopefully better now
9560d79 to
cafdff1
Compare
|
now with docs! |
lib/matplotlib/figure.py
Outdated
|
|
||
| axes_class : subclass type of `~.axes.Axes`, optional | ||
| The `.axes.Axes` subclass that is instantiated. This parameter | ||
| is incompatible with *projection* and *polar*. |
There was a problem hiding this comment.
This is somewhat mysterious. Can we link to an example here?
There was a problem hiding this comment.
do you want to pick one? :)
There was a problem hiding this comment.
I dunno, which ever subclass gets used the most?
There was a problem hiding this comment.
I found the right thing to link.
PR Summary
Implements #18548, see discussion there.
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsandpydocstyle<4and runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).