8000 _update_patch_limits should not use CLOSEPOLY verticies for updating · Issue #19078 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
_update_patch_limits should not use CLOSEPOLY verticies for updating  #19078
Closed
@jsberg-bnl

Description

@jsberg-bnl

Bug report

Bug summary

When patch.get_path() contains a CLOSEPOLY vertex, the coordinates of that point are not part of that path. But _update_patch_limits still uses these points in updating the data limits. patches.Wedge creates such points that are outside the region of the patch.

Code for reproduction

from matplotlib import patches
from matplotlib import pyplot

f = pyplot.figure()
a = f.add_subplot()
a.add_patch(patches.Wedge((0,-1.0),1.05,60,120,0.1))
a.relim()
a.autoscale_view(True)
f.show()

Actual outcome

201207a

# If applicable, paste the console output here
#
#

Expected outcome

The lower limit of the y axis should not be so far from the actual painted region.

Matplotlib version

  • Operating system: Arch Linux
  • Matplotlib version: 3.3.3
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.9.0
  • Jupyter version (if applicable):
  • Other libraries:

Installed via pacman

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0