-
Notifications
You must be signed in to change notification settings - Fork 7
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
geom_line
with colors connects different traces
#93
Comments
Thanks for reporting this - it's another problem (similar to #86) that is downstream from the "ad hoc" way I've handled the idea of "grouping" so far in the package. Hoping to have a fix for this on the way to 0.8.0 |
I have a MWE of grouping that may be useful. I'm not sure how it's being handled in TidierPlots (somewhere in using DataFrames, ColorSchemes, CairoMakie
import Makie.SpecAPI as S
df = DataFrame(
a = rand(20),
b = rand(20),
c = rand(["L", "H"], 20),
d = rand(["A", "B"], 20),
)
group_df = groupby(df, [:c, :d])
palette = ColorSchemes.tab10
ax = S.Axis()
for (i, key) in enumerate(keys(group_df))
s = S.Lines(group_df[key].a, group_df[key].b, color = palette[i])
push!(ax, s)
end
layout_spec = S.GridLayout(ax)
plot(layout_spec) It seems like the way to do grouping in Makie is to make multiple plot specs. |
Thanks @adknudson - this was essentially how I was imagining this would be fixed, but helpful to have a MWE. I added support for geoms that return multiple PlotSpecs when I was fixing |
|
If you plot different traces, the start of each trace gets connected to the next. Here's a reproducer:
The text was updated successfully, but these errors were encountered: