You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal is to have my special character concatenated with some other strings, so that they can be used as the xlabel or ylabel of my plot. Here is an example: "Dissolved oxygen (μmol/kg)". Unfortunately, I'm unable to do that. Below are what I've tried so far:
a * b works fine — it is just producing an ordinary string, which should still produce an equation in your plot label even though it doesn't display as rendered math in a notebook. You can also do LaTeXString(a * b) if you want it to render in the notebook.
(There is a common misconception that LaTeXString does some LaTeX rendering itself — it is mainly just a convenient way to type a LaTeX equation as a string without adding lots of extra backslashes. An ordinary String can also be used to pass math labels to plots.)
My goal is to have my special character concatenated with some other strings, so that they can be used as the xlabel or ylabel of my plot. Here is an example: "Dissolved oxygen (μmol/kg)". Unfortunately, I'm unable to do that. Below are what I've tried so far:
a = L"\mu"
𝜇
b = "mol"
“mol”
C1 = join(a,b)
“$mol\molmmolumol$”
C2 = string(a,b)
“$\mu$mol”
C3 = a * b
“$\mu$mol”
C4 = [a b]
1×2 Matrix{AbstractString}:
L"$\mu$" "mol"
C5 = hcat(a,b)
1×2 Matrix{AbstractString}:
L"$\mu$" "mol"
The text was updated successfully, but these errors were encountered: