Skip to content

FIX: re-instate ability to have position in axes #21443

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

Merged
merged 1 commit into from
Nov 5, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Oct 23, 2021

PR Summary

Closes #21441

import matplotlib.pyplot as plt

fig = plt.figure()

pos1 = [0.1, 0.1, 0.3, 0.8]
pos2 = [0.5, 0.1, 0.4, 0.6]

ax1 = plt.axes(position = pos1)
ax1.plot([0,1], [0, 1], color = 'r', linewidth = 3)

ax2 = plt.axes(position = pos2)
ax2.plot([1, 0], [0, 1], color = 'b', linestyle = '--')

is documented to work, but position is silently ignored. position is just redundant with rect, so go ahead and check for position if rect is None.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@jklymak jklymak added this to the v3.5.1 milestone Oct 29, 2021
@tacaswell
Copy link
Member

Do we want to sneak this in for 3.5.0?

@jklymak jklymak marked this pull request as ready for review October 29, 2021 18:39
@jklymak
Copy link
Member Author

jklymak commented Oct 29, 2021

I think that would be fine, OTOH, its a bit of an edge case and not urgent, I don't think

@QuLogic QuLogic merged commit 3d7dea5 into matplotlib:main Nov 5, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Nov 5, 2021
jklymak pushed a commit that referenced this pull request Nov 7, 2021
…21543)

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@QuLogic QuLogic modified the milestones: v3.5.1, v3.5.0 Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: axes(position = [...]) behavior
3 participants