Skip to content

DOC: Addition of plt.show() in the "How to create plots in pandas?" section of the Getting started tutorials #45772

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
1 task done
up-the-hill opened this issue Feb 2, 2022 · 2 comments · Fixed by #46231
Assignees
Labels
Milestone

Comments

@up-the-hill
Copy link

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/dev/getting_started/intro_tutorials/04_plotting.html#min-tut-04-plotting

Documentation problem

In all the code blurbs, the 6 plot outputs are shown without the required input of

plt.show()

For example, in the "I want a quick visual check of the data." section:

In[5]:air_quality.plot()
Out[5]: AxesSubplot:xlabel='datetime'

This may cause some confusion for people reading the docs who are not familiar with the matplotlib.pyplot module.

Suggested fix for documentation

The line of code:

in[n]: plt.show() (where n is the required line number of the code)

can be added before each of the graphs to show the required command to display the graph.
This will allow the readers of the documentation to learn how to display the required graph on the screen.

@up-the-hill up-the-hill added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 2, 2022
@mroeschke mroeschke removed the Needs Triage Issue that has not been reviewed by a pandas team member label Feb 11, 2022
@mroeschke
Copy link
Member

For plt.show() to be added, the restructured text will probably need these directives added to show correctly https://stackoverflow.com/a/60870687

@ehallam
Copy link
Contributor

ehallam commented Feb 28, 2022

take

ehallam added a commit to ehallam/pandas that referenced this issue Mar 5, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Mar 5, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Mar 5, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 7, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 9, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 9, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 10, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 10, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 10, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 10, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 10, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 10, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 13, 2022
ehallam added a commit to ehallam/pandas that referenced this issue Apr 13, 2022
@jreback jreback added this to the 1.5 milestone Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants