-
Notifications
You must be signed in to change notification settings - Fork 8
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
ggsave
or other means of saving plots from TidierPlots.jl
#20
Comments
I see we can get there from using p1 = @ggplot(penguins, aes(x = bill_length_mm, y = bill_depth_mm, color = species)) +
@geom_point() +
@geom_smooth(method = "lm") +
@scale_x_log10(name = "Log10 Scaled Bill Length") +
@scale_y_reverse(name = "Reversed Bill Width")
# https://aog.makie.org/stable/generated/penguins/#Small-intermezzo:-saving-the-plot
CairoMakie.save("figure.png", AlgebraOfGraphics.draw(Layers(p1)), px_per_unit = 3) |
We should absolutely add this. If @rdboyes doesn't have bandwidth, will see if someone else on our team can help with an initial implementation. |
I don't have the bandwidth this month (unfortunately dissertations don't write themselves) - ideal implementation is probably to add a version of save that takes a GGPlot type. Under the hood it should pretty much work like the code @joshualeond has above. Tagging this as a good first issue since it's pretty straightforward and self-contained, if nobody does it before the end of the month I'll work on it! |
Or maybe for consistency it should be a macro? |
I would keep it as a macro |
added in 33238a3 |
Hi there, I'm trying out
TidierPlots.jl
and was wondering if there's a recommended way to save a plot?Thanks!
The text was updated successfully, but these errors were encountered: