-
Notifications
You must be signed in to change notification settings - Fork 598
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
base: master
Are you sure you want to change the base?
Conversation
could you add a space after the comment symbols (e.g., |
Sure will , thanks for mentioning
…On Wed 10 Oct, 2018, 12:34 AM Benjamin Root, ***@***.***> wrote:
could you add a space after the comment symbols (e.g., # foo instead of
#foo)?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AevgHZEFE89dFqezIV2tULBspVVwqRR7ks5ujPMtgaJpZM4XT54H>
.
|
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) |
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.
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.
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.
I suggest using what we use in Matplotlib examples:
# Fixing random state for reproducibility
np.random.seed(19680801)
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.
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.`` |
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 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 |
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.
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 |
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.
This comment does not really add anything.
fig, ax = plt.subplots() | ||
|
||
#Styling the Plot a little ... |
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.
It doesn't just style; it does the actual plotting too. So this comment needs to be expanded a bit more.
No description provided.