🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@sandyowlet
Copy link
Contributor

DOC: fix the bug of examples\event_handling\data_browser.py

Closes #22329

Matplotlib now enforces that line data modifications must be sequences. However, the example script has not been updated accordingly, which will cause errors when running it.

Traceback (most recent call last):
  ...
  File "...\matplotlib\galleries\examples\event_handling\data_browser.py", line 72, in on_pick
    self.update()
  File "...\matplotlib\galleries\examples\event_handling\data_browser.py", line 92, in update
    self.selected.set_data(xs[dataind], ys[dataind])
  File "...\site-packages\matplotlib\lines.py", line 665, in set_data
    self.set_xdata(x)
  File "...\matplotlib\lines.py", line 1289, in set_xdata
    raise RuntimeError('x must be a sequence')
RuntimeError: x must be a sequence

Updated script to fix this bug.

PR checklist

@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Feb 26, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@tacaswell tacaswell added this to the v3.10.2 milestone Feb 26, 2025
@tacaswell tacaswell merged commit ef62e5b into matplotlib:main Feb 26, 2025
21 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 26, 2025
@tacaswell
Copy link
Member

Thank you @sandyowlet ! Congratulations on your first merged Matplotlib PR 🎉 and I hope we hear from you again.

timhoffm added a commit that referenced this pull request Feb 27, 2025
…680-on-v3.10.x

Backport PR #29680 on branch v3.10.x (DOC: fix the bug of examples\event_handling)
@QuLogic QuLogic modified the milestones: v3.10.2, v3.10.1 Feb 27, 2025
@ksunden ksunden mentioned this pull request Mar 3, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: examples files in galleries/examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants