Skip to content

Error running the animation/random_walk.py example #13778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
daguito81 opened this issue Mar 28, 2019 · 5 comments
Closed

Error running the animation/random_walk.py example #13778

daguito81 opened this issue Mar 28, 2019 · 5 comments

Comments

@daguito81
Copy link

Bug report

Bug summary

When running the random_walk.py example, python throws an error

Code for reproduction
This appears by running random_walk.py as is

Actual outcome

AttributeError stating that the generated ax has no plot attribute

Traceback (most recent call last):
  File "random_walk.py", line 52, in <module>
    lines = [ax.plot(dat[0, 0:1], dat[1, 0:1], dat[2, 0:1])[0] for dat in data]
  File "random_walk.py", line 52, in <listcomp>
    lines = [ax.plot(dat[0, 0:1], dat[1, 0:1], dat[2, 0:1])[0] for dat in data]
AttributeError: 'NoneType' object has no attribute 'plot'

Matplotlib version

  • Operating system: Windows 10 Pro Version 1803
  • Matplotlib version: 2.2.3
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.6.6
  • Jupyter version (if applicable): N/A
  • Other libraries: N/A
@daguito81
Copy link
Author

daguito81 commented Mar 28, 2019

I posted the bug for documentation purposes but I'd like to take a crack at it

@anntzer
Copy link
Contributor

anntzer commented Mar 28, 2019

The example must be run with matplotlib master, not 2.2.3 (with 2.2.3, you need to run an older version of the example).

@daguito81
Copy link
Author

Thank you for your comment. I tested it with master and indeed it works. Sorry about that

@anntzer
Copy link
Contributor

anntzer commented Mar 28, 2019

No worries. Good to close?

@daguito81
Copy link
Author

daguito81 commented Mar 28, 2019 via email

@anntzer anntzer closed this as completed Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants