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

Fix raster plot physical units in label #3136

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

Conversation

clinssen
Copy link
Contributor

@clinssen clinssen commented Mar 5, 2024

With props to @abigailm

I would suggest @tomtetzlaff as a second reviewer.

Copy link
Contributor

@jessica-mitchell jessica-mitchell left a 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

@clinssen clinssen added S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation. I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Mar 11, 2024
Copy link
Contributor

@heplesser heplesser left a 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.

@@ -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)
Copy link
Contributor

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.

Copy link
Contributor Author

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)")
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link

Pull request automatically marked stale!

@github-actions github-actions bot added the stale Automatic marker for inactivity, please have another look here label Jul 15, 2024
@terhorstd
Copy link
Contributor

Could you please provide a short description for this PR?

@github-actions github-actions bot removed the stale Automatic marker for inactivity, please have another look here label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants