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

[MNT] - Fix power spectrum plot ylabel formatting #339

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

TomDonoghue
Copy link
Member

@TomDonoghue TomDonoghue commented Nov 16, 2024

Currently, the default y-label for a PSD plot is the string literal 'Power (V^2/Hz)', which isn't properly formatted to display the superscript exponent.

This PR updates the formatting, to actually use a superscript, so the plot label now looks like this:
Screen Shot 2024-11-16 at 4 37 52 PM

I think the only thing to consider / check is whether there is some reason this formatting might not work across systems(?). It works smoothly for me - would be good if someone else could check it renders properly.

@neurodsp-tools neurodsp-tools deleted a comment from codecov bot Nov 16, 2024
Copy link
Member

@ryanhammonds ryanhammonds left a comment

Choose a reason for hiding this comment

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

Seems like mathtext is distributed with matplotlib:

TeX does not need to be installed to use Mathtext because Matplotlib ships with the Mathtext parser and engine.

My understanding is this should work with any installation of matplotlib and doesn't depend on a system latex installation.

@TomDonoghue TomDonoghue merged commit 59a911d into main Nov 18, 2024
9 checks passed
@TomDonoghue TomDonoghue deleted the figlabel branch November 18, 2024 22:43
@neurodsp-tools neurodsp-tools deleted a comment from codecov bot Nov 18, 2024
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.

2 participants