Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bad autoscale_view() with long curved FancyArrowPatch #19723

Copy link
Copy link
Open
@grahamgower

Description

@grahamgower
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.