Skip to content

Error running the animation/random_walk.py example #13778

Closed

Description

@daguito81

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

Activity

  1. daguito81 commented on Mar 28, 2019

    @daguito81
    Author

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

  2. added a commit that references this issue on Mar 28, 2019
  3. anntzer commented on Mar 28, 2019

    @anntzer
    Contributor

    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).

  4. daguito81 commented on Mar 28, 2019

    @daguito81
    Author

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

  5. anntzer commented on Mar 28, 2019

    @anntzer
    Contributor

    No worries. Good to close?

  6. daguito81 commented on Mar 28, 2019

    @daguito81
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions