Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

UniftulRecipes and LaTeXStrings

$
0
0

Hi

Is there a way to use simultaneously UnitfulRecipes and LaTeXStrings? Somewhat like (adapted from UniftulRecipes’ first example:

using Unitful, UnitfulRecipes, Plots, LaTeXStrings
const a = 1u"m/s^2"
v(t) = a * t
x(t) = a/2 * t^2
t = (0:0.01:100)*u"s"
plot(x.(t), v.(t), xlabel=L"\textrm{Position} \xi", ylabel=L"\textrm{Speed} \sigma")

and it should have the correct LaTeX labels in both axes, appended with their respective units (within parentheses). However, this does not work… I might always ustrip the unitful quantities and set the labels manually together with their units, but I thought this should work seamlessly with Unitful, UnitfulRecipes and LaTeXStrings…

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles