-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Add plotting examples and fix broken examples #33989
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
DOC: Add plotting examples and fix broken examples #33989
Conversation
Thanks @deppen8, cool stuff. Did you render the website to see that everything is looking as expected? @jorisvandenbossche, may be you want to have a look here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good generally, just wondering: are the random seeds necessary? We don't really do this in other parts of docs, I think.
pandas/plotting/_misc.py
Outdated
|
||
>>> s = pd.Series(np.random.uniform(size=100)) | ||
>>> fig = pd.plotting.bootstrap_plot(s) # doctest: +SKIP | ||
>>> np.random.seed(5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this seed needed?
@datapythonista, I built the docs locally and nothing looked out of order. @jorisvandenbossche I found this advice which suggested using random seeds. In the case of the lag plot, it has an added benefit of keeping the demo data above zero, which probably matches most use cases better. |
Ah, yes, but that's only to get doctests passing where eg a number is shown in the output, while here the plots are not actually checked. For the lag plot that sounds like a good reason, for the others I would maybe remove it again, if we don't do that elsewhere |
Done! |
Thanks @deppen8 ! |
This PR improves the
pandas.plotting._misc.py
module docs by:In some cases, I replicated the examples found in the User Guide.