Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Minor fixes and Comments#25

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
StephennFernandes wants to merge3 commits intomatplotlib:master
base:master
Choose a base branch
Loading
fromStephennFernandes:master

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 commentedOct 9, 2018 via email

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)

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 reproducibilitynp.random.seed(19680801)

Copy link
Member

@QuLogicQuLogic 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 explainwhy orhow, notwhat 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 freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ImportanceOfBeingErnestImportanceOfBeingErnestImportanceOfBeingErnest left review comments

@QuLogicQuLogicQuLogic requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@StephennFernandes@WeatherGod@QuLogic@ImportanceOfBeingErnest

[8]ページ先頭

©2009-2025 Movatter.jp