Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Setting pickradius regression in 3.4.0rc #19700

Closed
@ericpre

Description

@ericpre

Bug report

Bug summary

The pickradius doesn't seem to be set in matplotlib 3.4.0rc, while this is working fine in 3.3.4.
Using axline.set_pickradius(value) works fine.

Code for reproduction

import matplotlib.pyplot as plt

def pick_handler(event):
    print('picked')

fig, ax = plt.subplots()
plt.plot([0, 1, 2])
fig.canvas.mpl_connect('pick_event', pick_handler)

value = 15
axline = plt.axhline(y=1, color="red", pickradius=value, picker=True)

Actual outcome

The pickradius should be set in the call of plt.axhline.

Expected outcome

Matplotlib version

  • Operating system:
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)):
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version:
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions