Skip to content

_update_patch_limits should not use CLOSEPOLY vertices for updating  #19078

Closed

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

Activity

  1. added
    🌱 Good first issue
    on Dec 7, 2020
  2. anntzer commented on Dec 7, 2020

    @anntzer
    Contributor

    Seems reasonable, and should be a fairly self-contained patch, so marking as good first issue.

  3. added this to the v3.5.0 milestone on Dec 8, 2020
  4. modified the milestones: v3.5.0, v3.4.0 on Dec 24, 2020
  5. changed the title [-]_update_patch_limits should not use CLOSEPOLY verticies for updating [/-] [+]_update_patch_limits should not use CLOSEPOLY vertices for updating [/+] on Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: confirmed bug🌱 Good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions