-
Notifications
You must be signed in to change notification settings - Fork 45
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
Pass custom scale in spec
or in style
?
#75
Comments
Currently the pair is used to make transformation on the data, for example |
My thought was that you need some way to specify via AlgebraOfGraphics what type each keyword even maps to. So I think that this consideration belongs to the mapping. So to Because it would be annoying to specify the full mapping everytime, we could maybe dispatch on keyword symbols and plotting functions to give defaults for this mapping. Something like style(:SepalLength, :SepalWidth, color = :Species)
# then internally
default_scale(::Val{:color}, plot_type) = colorscale(:linear, palette = default_palette())
# but instead the user could also do
style(:SepalLength, :SepalWidth, color = :Species => colorscale(:log, palette = :Blues()) |
MakieThemes should provide a few default themes, but we should also make sure that it's easy to customize. I would just use a dictionary rather than a method table, but that's just an implementation detail. I'm starting to get convinced that one can just pass scales to First of all, it needs to:
Then, the discrete scale would receive the value and the list of unique values and will spit out a result. The continuous scale will receive a value and the extrema and spit out the result. I imagine a function could be assumed to be continuous, and discrete things would have a Finally, each scale should decide whether the limits (or, in the discrete case, the list of unique values) are from all layers, or only from the layers with the same It would actually be easier to not support Alternatively, each scale could receive the list of unique value per |
Option 1)
Option 2)
For reference, see original discussion, and newer discussion.
The text was updated successfully, but these errors were encountered: