Skip to content

bad autoscale_view() with long curved FancyArrowPatch #19723

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

Open
grahamgower opened this issue Mar 17, 2021 · 4 comments
Open

bad autoscale_view() with long curved FancyArrowPatch #19723

grahamgower opened this issue Mar 17, 2021 · 4 comments
Labels
keep Items to be ignored by the “Stale” Github Action status: confirmed bug topic: arrow

Comments

@grahamgower
Copy link

Bug report

When using a very long FancyArrowPatch with connectionstyle="arc3", subsequent axes autoscaling can badly squash the figure's content. Example below exhibits the problem, but more extreme squashing can easily be obtained. Possibly this is not limited to FancyArrowPatch?

Code for reproduction

import matplotlib
import matplotlib.pyplot as plt

fap = matplotlib.patches.FancyArrowPatch(
    (10, 10),
    (20, 2e4),
    mutation_scale=50,
    connectionstyle="arc3,rad=0.3",
)

_, ax = plt.subplots()
ax.add_patch(fap)
ax.set_title(f"matplotlib {matplotlib.__version__}")
ax.autoscale_view()
ax.figure.savefig("curved-arrow.png")

Actual outcome

curved-arrow

Expected outcome

The axes view should span the drawn content. Any control point(s) required for the arc should be ignored.

Matplotlib version

  • Operating system: Linux
  • Matplotlib version: 3.3.4
  • Matplotlib backend: Reproducible with at least GTK3Agg and agg.
  • Python version: 3.9

Matplotlib installed via pip.

@QuLogic
Copy link
Member

QuLogic commented Mar 18, 2021

This is a duplicate of #19174, I believe.

@dstansby
Copy link
Member

dstansby commented Oct 8, 2021

I don't think it is; #19214 seems to fix #19174 but not this.

Copy link

github-actions bot commented Dec 1, 2023

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 Dec 1, 2023
@github-actions github-actions bot added the status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. label Jan 2, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
@dstansby
Copy link
Member

dstansby commented Jan 2, 2024

I can still reproduce this on current main.

@dstansby dstansby reopened this Jan 2, 2024
@dstansby dstansby added status: confirmed bug and removed status: duplicate status: inactive Marked by the “Stale” Github Action status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. labels Jan 2, 2024
@oscargus oscargus added the keep Items to be ignored by the “Stale” Github Action label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Items to be ignored by the “Stale” Github Action status: confirmed bug topic: arrow
Projects
None yet
Development

No branches or pull requests

4 participants