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
Is it an expected behavior, a bug, or a not yet implemented feature, that the following reprex is unable to use color as a labs label?
If I run the following code, I get the expected plot.
If I uncomment the # color = "Cylinders" line, I would expect the figure legend to have a header of Cylinders, but instead I get the error ERROR: KeyError: key "color" not found
I originally encountered this error from the TidierCourse example, where the page shows Gender at the top of the figure legend, but the code would not execute for me, so I created this shorter reprex. I am VERY new to Tidier.jl (installed it 2 hours ago) and inexperienced at Julia (come from an R / tidyverse background), so apologies if I'm just being dumb.
Reproducible example
using Tidier, RDatasets
mtcars = @chain dataset("datasets", "mtcars") begin
@clean_names
@mutate(cyl_factor = string(cyl))
end
@chain mtcars begin
ggplot(@aes(x = wt, y = mpg, color = cyl_factor))
geom_point()
geom_smooth()
labs(
# color = "Cylinders",
x = "Weight",
y = "Miles per gallon"
)
end
The text was updated successfully, but these errors were encountered:
Thank you for flagging. From reading the code, I think support for this just hasn't been added back yet. Since the TidierCourse was published to GitHub, TidierPlots has undergone a number of changes to the backend. We used to wrap AlgebraOfGraphics, and now we directly wrap Makie, which has a number of other advantages. I'll let @rdboyes speak to this, but it looks like we would need to add the color title to the legend portion of AxisOptions, and then to deal with any weirdness between color/fill in Makie.
I do plan to spend some time on TidierCourse. Thanks for diving in!
Is it an expected behavior, a bug, or a not yet implemented feature, that the following reprex is unable to use
color
as alabs
label?If I run the following code, I get the expected plot.
If I uncomment the
# color = "Cylinders"
line, I would expect the figure legend to have a header ofCylinders
, but instead I get the errorERROR: KeyError: key "color" not found
I originally encountered this error from the TidierCourse example, where the page shows
Gender
at the top of the figure legend, but the code would not execute for me, so I created this shorter reprex. I am VERY new toTidier.jl
(installed it 2 hours ago) and inexperienced at Julia (come from an R / tidyverse background), so apologies if I'm just being dumb.Reproducible example
The text was updated successfully, but these errors were encountered: