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

Latex mu not being affected by rcParams #58

Closed
Alessandro-Zunino opened this issue Oct 16, 2023 · 3 comments
Closed

Latex mu not being affected by rcParams #58

Alessandro-Zunino opened this issue Oct 16, 2023 · 3 comments

Comments

@Alessandro-Zunino
Copy link

Can you change the definition of the symbol of greek mu (as in the micrometer) such that it uses the font defined in the script in which matplotlib-scalebar is being imported? Using the \mathregular command should be enough. e.g. mu = '\mathregular{ \mu }'

@ppinard
Copy link
Owner

ppinard commented Jan 5, 2025

Could you explain what is the difference between \\mathrm{{\\mu}}m$ and $\\mathregular{{\\mu}}m$?

@Alessandro-Zunino
Copy link
Author

The \mathregular command forces the symbol to be printed using the same font of the rest of the figure (see: https://matplotlib.org/stable/users/explain/text/mathtext.html). This is advantageous, because the symbol can then be interpreted as text instead of an image by vector graphics editors (such as Inkscape, Adobe Illustrator, CorelDRAW, etc.).

@ppinard
Copy link
Owner

ppinard commented Jan 8, 2025

Thank you very much for the explanation. I will make the change to use \\mathregular.

ppinard added a commit that referenced this issue Jan 17, 2025
@ppinard ppinard closed this as completed Jan 17, 2025
zezhong-zhang pushed a commit to zezhong-zhang/matplotlib-scalebar that referenced this issue Feb 20, 2025
zezhong-zhang pushed a commit to zezhong-zhang/matplotlib-scalebar that referenced this issue Feb 20, 2025
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

No branches or pull requests

2 participants