Skip to content
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

axis labels for plot! #60

Closed
JeffFessler opened this issue Jul 19, 2021 · 0 comments · Fixed by #61
Closed

axis labels for plot! #60

JeffFessler opened this issue Jul 19, 2021 · 0 comments · Fixed by #61

Comments

@JeffFessler
Copy link
Contributor

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)

Screen Shot 2021-07-18 at 9 21 18 PM

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant