Skip to content

Collections could check x- and y- transforms separately to decide whether to autoscale each direction #15518

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

Closed
anntzer opened this issue Oct 25, 2019 · 2 comments
Labels
status: inactive Marked by the “Stale” Github Action
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Oct 25, 2019

Bug report

Consider the following example

from pylab import *
plt.rcdefaults()
fig, ax = plt.subplots()
ax.plot([1, 3], [5, 7])
ax.vlines(x=[1, 2, 3], ymin=0, ymax=1, transform=ax.get_xaxis_transform())
plt.show()

where I want to use vlines in a manner similar to axvline, i.e. lines spanning the full axes height (but more efficiently than with repeated calls to axvline, as vlines will create a single LineCollection.

test

The autoscaling in the y axis incorrectly goes all the way down to include (0, 1) (coming from the call to vlines), even though these values are in axes coordinates rather than data coordinates.

In effect, I think this is equivalent to the suggestion at #13642 (comment).

Matplotlib version

  • Operating system: linux
  • Matplotlib version: master or 3.1
  • Matplotlib backend (print(matplotlib.get_backend())): any
  • Python version: 37
  • Jupyter version (if applicable): no
  • Other libraries:
@github-actions
Copy link

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Jun 28, 2023
@ksunden
Copy link
Member

ksunden commented Jun 28, 2023

Fixed by #25324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: inactive Marked by the “Stale” Github Action
Projects
None yet
Development

No branches or pull requests

2 participants