poor handling of LaTeX in x- and y-axis labels #4220
Replies: 11 comments
-
I use "CMU Serif", it's not exactly the same but it looks good enough. |
Beta Was this translation helpful? Give feedback.
-
I also thought that it might be worthwhile to add some really simple markup syntax to our default layout algorithm which could handle super and subscripts. It's kind of unnecessary to rely on unicode for that, especially because we know coverage is not great. Maybe something html-looking like |
Beta Was this translation helpful? Give feedback.
-
thanks for the tip! this is a decent patch, but honestly not a fan of the CMU Serif font / being restricted to this for all of my plots. allowing for html to make super and subscripts would be a great start! I'm finding myself changing variable names in my papers (to less ideal/clear ones) to accommodate Unicode/CairoMakie. 👀 |
Beta Was this translation helpful? Give feedback.
-
@jkrumbiegel is there any way to make a subscript \infty? 😢 |
Beta Was this translation helpful? Give feedback.
-
you mean this, or? using GLMakie, LaTeXStrings
fig, ax, obj = lines(0..2π, sin;
label = L"sin_{\infty}(x)",
figure = (;fontsize = 38))
axislegend(ax)
fig |
Beta Was this translation helpful? Give feedback.
-
@lazarus, I'm trying to avoid the ugly LaTeX font so was wondering if this is possible with the unicode character. |
Beta Was this translation helpful? Give feedback.
-
This could be done with fig, ax, obj = lines(0 .. 2π, sin;
figure=(; fontsize=38),
axis=(; title=rich("sin", subscript("∞"), "(x)")))
fig |
Beta Was this translation helpful? Give feedback.
-
yeah, the that said, something like supporting fira math font or allowing to change the LaTeX style would still be a game changer for me. eg. snapshot from my recent paper (barely acceptable). |
Beta Was this translation helpful? Give feedback.
-
@Kolaru pointed out that one just needs 2 small little tweaks per font, which are probably these numbers here: |
Beta Was this translation helpful? Give feedback.
-
I also suggested a little GLMakie app to tweak these per font. And I had super-subscript for |
Beta Was this translation helpful? Give feedback.
-
What's the state of these "publication quality plots" kind of issues nowadays? |
Beta Was this translation helpful? Give feedback.
-
❤️ Makie generally, but to include these plots in scientific publications, imperative for me to include math in my x- and y-axis labels.
e.g. there seems to be no "q" subscript in Unicode so I must resort to LaTeX here. and it gives me two different fonts for my x- and y-axis labels. any way to mix LaTeX font for the variables with regular (nice-looking) font for the non-math mode? see how the x- and y-axis labels are in a different font?
sure, a solution for consistent font is to use LaTeX mode for everything, but this font for LaTeX is incredibly ugly. I'm thinking about
matplotlib
that allows LaTeX and text seamlessly.Beta Was this translation helpful? Give feedback.
All reactions