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

Minor fixes and Comments #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

StephennFernandes
Copy link

No description provided.

@WeatherGod
Copy link
Member

could you add a space after the comment symbols (e.g., # foo instead of #foo)?

@StephennFernandes
Copy link
Author

StephennFernandes commented Oct 9, 2018 via email

import numpy as np
import matplotlib.pyplot as plt
np.random.seed(1)
np.random.seed(1) # generates exact same random values as they are here inside .seed(value)

Choose a reason for hiding this comment

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

Since I suppose the comment is mainly useful for absolute beginners, and this carries a bit of ambiguity (.seed does not generate anything, where is "here" (this line or this tutorial?)) an alternative would maybe be

 # Fix the random state to have the same numbers created whenever this code is being run.

Copy link
Member

Choose a reason for hiding this comment

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

I suggest using what we use in Matplotlib examples:

# Fixing random state for reproducibility
np.random.seed(19680801)

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

With the exception of the seed comment, I'm not too sure these comments are helpful. They should explain why or how, not what because that is mostly clear from the code already.

the matplotlib library. Hopefully, this tutorial may serve as inspiration
for future restructuring of the matplotlib documentation. Plus, I have some
ideas of how to improve this tutorial.
ideas of how to improve this tutorial.``
Copy link
Member

Choose a reason for hiding this comment

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

Is there a particular reason for putting this paragraph in code?

@@ -11,4 +12,5 @@
ax.plot(x, y, color='black')
ax.set(xticks=[], yticks=[], title=name)

#printing plot in IDE
Copy link
Member

Choose a reason for hiding this comment

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

This neither prints, nor uses an IDE, so I don't know what this comment means.

@@ -23,8 +24,10 @@

# Now you're on your own!

#making sublots
Copy link
Member

Choose a reason for hiding this comment

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

This comment does not really add anything.

fig, ax = plt.subplots()

#Styling the Plot a little ...
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't just style; it does the actual plotting too. So this comment needs to be expanded a bit more.

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

Successfully merging this pull request may close these issues.

4 participants