fix presorted not working with color scales#720
fix presorted not working with color scales#720TheLostLambda wants to merge 1 commit intoMakieOrg:masterfrom
presorted not working with color scales#720Conversation
The newly added reference test used to throw a runtime error — it now produces the expected plot.
|
Hi, thanks for the PR! So, I don't think changing I've thought about the actual problem you're trying to solve here before, which is that it's annoying to specify palettes with data => style pairings if the data has been wrapped. But this doesn't only apply to |
|
Hi @jkrumbiegel ! I think you're right that that sounds like a much cleaner overall approach! I was trying to keep what I was touching here to a minimum, but I'm happy to make that slightly larger, more "proper" fix! It may be a little while before I have the time for it, but I'll keep you posted! |
|
Perhaps there should be an abstract type for these wrappers, then all of the current wrappers can be a subtype of that? That way users could also add their own wrappers and just "inherit" from that abstract wrapper type so that they are automatically unwrapped too? |
|
I'm usually not a fan of abstract types because they only work for one thing, while simply defining methods / traits can be used for however many behaviors. |
|
A note for myself (something to include in this PR): |
|
Another note for myself (something that might be fixed by this proper unwrapping) is that EDIT: And |
The newly added reference test used to throw a runtime error — it now produces the expected plot.
AlgebraOfGraphics.jl/src/scales.jl
Line 88 in c2751aa
Presorted("key")would not compare equal to the"key"in the color mapping.This feels like a reasonable way for
isequal(Presorted)to behave, as it's in line with the existing definition that ignores the.ifield.This is my first PR to this repo and one of my first to Julia, so let me know if I've missed anything!