-
Notifications
You must be signed in to change notification settings - Fork 367
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
Fix raster plot physical units in label #3136
base: master
Are you sure you want to change the base?
Conversation
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.
Ok then this looks good to me
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.
Looks good overall, just some small suggestions. And obviously I do not see here what you may have overlooked.
pynest/examples/balancedneuron.py
Outdated
@@ -123,13 +123,13 @@ | |||
|
|||
|
|||
def output_rate(guess): | |||
print("Inhibitory rate estimate: %5.2f Hz" % guess) | |||
print("Inhibitory rate estimate: %5.2f spks/s" % guess) |
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.
Please update to use Python format strings here and in other places touched by this PR.
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.
Done!
@@ -268,7 +268,7 @@ def _make_plot(ts, ts1, node_ids, neurons, hist=True, hist_binwidth=5.0, graysca | |||
|
|||
plt.bar(t_bins, heights, width=hist_binwidth, color=color_bar, edgecolor=color_edge) | |||
plt.yticks([int(x) for x in numpy.linspace(0.0, int(max(heights) * 1.1) + 5, 4)]) | |||
plt.ylabel("Rate (Hz)") | |||
plt.ylabel("Rate (spks/s)") |
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.
There seems to be some inconsistency in using () and [] around units. @jessica-mitchell Do we have a policy on this?
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.
No we don't; it seems from a quick look into the notation that both parentheses and square brackets are simply style choices - so my opinion is that whatever the majority of cases show that we do that. What do you think @heplesser
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.
Would suggest to tackle this elsewhere/create a separate issue for this.
Pull request automatically marked stale! |
Could you please provide a short description for this PR? |
With props to @abigailm
I would suggest @tomtetzlaff as a second reviewer.