-
Notifications
You must be signed in to change notification settings - Fork 729
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
[Feature] siunitx mplstyle #101
Comments
I feel the problem with the preambles is impossible to tackle down. It's more likely something that could be resolved on the matplotlib interface side. BTW, matplotlib provides a way to use math text without latex that is much faster, so pursuing this change may not have a broad impact in the long term. Anyways, I don't want to discourage you. Feel free to open a PR. Don't forget to add |
Turkish font is working (latex-siunitx style has been removed). sudo apt-get install texlive-science (for siunitx – A comprehensive (SI) units package) import numpy as np #from mplfonts import use_font x = np.linspace(0.75, 1.25, 201) def model(x, p): pparam = dict(xlabel=r'Voltaj/Gerilim (\si{\milli\volt})', ylabel=r'Akım (\si{\micro\ampere})') with plt.style.context(['science','turkish-font']): |
Average execution time of the code:
|
Hello, hope you are doing great.
There is this package siunitx which allows for a better usage of units in latex. This allows for different usage of units inside latex and to be more consistent in their use inside and outside of equations.
I believe it would be easy to implement in
SciencePlots
as an additional mplstyle.Proposal
For this it could be easy to create a
latex-siunitx.mplstyle
inside themisc
folder with the lineExample
With the current implementation units would be like
with the new implementation it would change to
Caveats
The only problem I seem to find with this is that if another style changes the
text.latex.preamble
line it would clash. It would be a problem fornature
,russian-font
,turkish-font
,latex-sans
,pgf
andsans
. Also it wouldn't work with styles that don't use latex likenotebook
.Maybe this could be worked around in some way.
Best, Fran
The text was updated successfully, but these errors were encountered: