Pietro Vertechi
Pietro Vertechi
This is the most problematic bit in the interaction with Makie. I imagine that more often than not, the user wants categorical variables to be passed to Makie as integers...
See https://github.com/JuliaPlots/AlgebraOfGraphics.jl/discussions/345 for a proposal.
@greimel, that's a smart trick, in general using `group` to separate lines is probably a good thing to know, definitely worth to have it in the docs
I think the issue is that categorical color variables (eg, columns of strings) are converted using the default color palette, so AlgebraOfGraphics does actually not look into `colormap` at all....
> At least as I understand it, for continuous scales you would normally want to use `colormap`. Is the confusion that continuous and categorical scales have very different syntaxes? I...
Ah, I think I understand it now. You would want to split color palettes in two steps. The palette gives you integers, and the colormap turns them into colors. Reopening...
> So for example, your mapping is `["a" => 1, "b" => 2, "c" => 3]` and then if you have another plot with only `"b"` and `"c"` such that...
It took me a little bit, but I also grew convinced that the `levels` keyword is the correct approach. I think a PR would be great, but for now I...
> But maybe not, I can imagine scenarios where it might be useful I had also initially thought one should be strict, but for instance @SimonDanisch asked for this feature:...
Thinking more about this, I think there's the extra problem that the "levels" are much more a property of the data than they are a property of the plot attribute....