If I start a figure with plot with some basic stuff like the title
and then use plot! to add data, the units do not appear. MWE:
using UnitfulRecipes
using Unitful: m
using Plots
x = (1:5)m
y = x.^2
p1 = plot(x, y, label="")
plot!(title = "this order works")
p2 = plot(title="no axis units here :(")
plot!(x, y, label="")
plot(p1, p2)
I realize that in this MWE I could reverse the order and plot the data first then add the title,
but often I am looping over several datasets and adding each using plot!
so it can be convenient to start with the title or other stuff.
I am unsure if this issue is specific to UR and fixable,
or if it is a more general limitation of Recipes that I must find some other way to work around?
If I start a figure with
plot
with some basic stuff like the title and then useplot!
to add data, the units do not appear. MWE:I realize that in this MWE I could reverse the order and plot the data first then add the title, but often I am looping over several datasets and adding each using
plot!
so it can be convenient to start with the title or other stuff. I am unsure if this issue is specific to UR and fixable, or if it is a more general limitation of Recipes that I must find some other way to work around?