Skip to content
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

Adding matplotlib tutorial content #167

Closed
wants to merge 18 commits into from

Conversation

anissa111
Copy link
Member

Addresses #102

This notebook adds content from the first matplotlib tutorial and the advanced plotting with geocat-viz tutorial.

@anissa111 anissa111 requested a review from a team as a code owner October 28, 2021 17:31
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions
Copy link

github-actions bot commented Oct 28, 2021

This pull request is being automatically built with GitHub Actions and Netlify. To see the status of your deployment, click below.

🔍 Git commit SHA: 274cb98
✅ Deployment Preview URL: https://621558c25a8ae52a01c16bc9--pythia-foundations.netlify.app

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

@mgrover1 mgrover1 Oct 28, 2021

Choose a reason for hiding this comment

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

Suggest changing numpy to numpy


Reply via ReviewNB

Copy link
Member

Choose a reason for hiding this comment

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

I respectfully disagree? As a style point, we should use numpy when we're referring specifically to Python code (e.g. import statements), but when referring to the name of the package in English text, we should follow the NumPy docs and our own Foundations chapter and write it as "NumPy"

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

In most of the content, we typically refrain from including comments in the cell - could you cover this within the markdown above?


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

@mgrover1 mgrover1 Oct 28, 2021

Choose a reason for hiding this comment

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

Might be good to remove the "make a histogram" comment


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

@mgrover1 mgrover1 Oct 28, 2021

Choose a reason for hiding this comment

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

Can you briefly describe the requirement for numerical inputs?


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

@mgrover1 mgrover1 Oct 28, 2021

Choose a reason for hiding this comment

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

Can you mention what 'pillow' is here?


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

@mgrover1 mgrover1 Oct 28, 2021

Choose a reason for hiding this comment

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

Can you add the following few sections at the end?

* Summary

* What's Next

* Resources and References


Reply via ReviewNB

@mgrover1
Copy link
Contributor

Overall @anissa111 , this looks great! Thanks for putting this together. Just a few minor formatting/template matching suggestions!

Copy link
Contributor

@mgrover1 mgrover1 left a comment

Choose a reason for hiding this comment

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

See the nbreview comments

@anissa111
Copy link
Member Author

Thanks @mgrover1, I'll get to those!

@@ -0,0 +1,2297 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

If you remove comments from the code blocks above, then do the same here for consistency!


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

First, this is cool! I actually didn't know about this Matplotlib functionality, and I love the "explode" argument.

Second, can you add some explanation for the last argument autopct?


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

Similar to my comment above about "NumPy", we should write the name of the package as "Matplotlib" (with capitalization) where it appears in the text.


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

Possible to explain in one or two sentences what is rc , or what this command does?


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Line #10.    plt.pie(sizes, labels=labels, explode=explode, colors=colors, autopct='%1.1f%%');

What does autopct do?


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Line #1.    def animate(i):

Can you say more about how i changes with each invocation? Presumably i is an integer that is incremented by 1 and starts from 0...Perhaps it is more complicated than that?


Reply via ReviewNB

@@ -0,0 +1,2297 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Line #1.    anim.save('animate.gif', writer='pillow');

gifs are perhaps not the best format for animations (though they are portable). Are there other, more modern codecs supported by matplotlib.animation that might be a better choice for the example, or perhaps just a mention?


Reply via ReviewNB

@jukent jukent added the content Content related issue label Nov 8, 2021
@jukent jukent mentioned this pull request Feb 18, 2022
@jukent jukent mentioned this pull request Feb 22, 2022
@jukent
Copy link
Contributor

jukent commented Feb 22, 2022

Closing from #233

@jukent jukent closed this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Content related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants