Skip to content

Fixed AttributeError bug on animation/random_walk.py example and added description #13779

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
wants to merge 1 commit into from

Conversation

daguito81
Copy link

PR Summary

Fixed a bug in the example animation/random_walk.py related to #13778 by and added the description for the example for issue #8921

PR Checklist

  • Has Pytest style unit tests
  • [ X] Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

@anntzer
Copy link
Contributor

anntzer commented Mar 28, 2019

Thanks for the PR, but I don't think there's anything to be changed here, except perhaps clarifying (generally) that examples must be run with the corresponding version of Matplotlib (and thus mpl master examples -> mpl master).

@ImportanceOfBeingErnest
Copy link
Member

I guess if you restrict this PR to adding a description, it would still be an improvement.

@daguito81
Copy link
Author

I was planning on tackling a couple of excercises missign descriptions as stated on #8921. Would it be better to close this PR and then do a new one with only the descriptions but add more of them?

@ImportanceOfBeingErnest
Copy link
Member

Sure, whatever suits you better.
While walking through examples, you can also add references as discussed in #10974.

@daguito81 daguito81 closed this Mar 28, 2019
@daguito81 daguito81 deleted the fix-random-walk branch March 28, 2019 12:40
@PredatorFeesh
Copy link

PredatorFeesh commented Apr 12, 2019

I'm having the same issue, I'm wondering why this wasn't merged in

@daguito81
Copy link
Author

@PredatorFeesh the problem was that I was using the stable version of matplotlib which is the version you get from doing your pip install. But this example is done on the dev branch (master) which is further ahead with some functionality that changed how the examples behave.

You need to either checkout the branch of the version you are using locally and get the examples from there, or download and build the dev branch and then run the examples with that branch.

If you use the matplotlib 3.0+ examples with matplotlib 2.4 for example, then this example won't run

@story645
Copy link
Member

@PredatorFeesh you can check your version of Matplotlib using

import matplotlib
matplotlib.__version__

in the environment in which you're running the example. Sorry, completely forgot about that check (sometimes the installs of the dev version don't stick).

@PredatorFeesh
Copy link

I'm running version 3.0.3, which is what pip installs.

@story645
Copy link
Member

story645 commented Apr 12, 2019

Sorry, missed that - you need to install off your branch. Instructions starting around https://matplotlib.org/devel/gitwash/set_up_fork.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants