-
Notifications
You must be signed in to change notification settings - Fork 26
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
Category color assignment #110
Comments
I think I fixed this, and #75 , but it would be very good if you could check the new ramp() behavior (not just these two cases). Thank you! |
@davidmanzanares what are the new ramp behaviors? |
I hope that the ones that you expected in the first place. I'm saying this because the fix included relatively important changes that affect all maps that are styled by category, not just ramps, actually, and I'm not very confident in the solution 😂 |
ohhhh ok. I'll go through all my category map types and check them! |
heyy @davidmanzanares Ok, so I went through the cateogry maps.
Two that I want to take a closer look at in the morning to understand better what is happening. To be honest, I kind of like these results but want to take a deeper look over multiple datasets to figure out the pattern better.
I think there are over 200 neighborhoods defined... will test over different datasets
Ok! I'll dig deeper tomorrow. |
@davidmanzanares the initial issue of colors being skipped in category schemes seems to be fixed. I still don't understand exactly what is happening with colors being interpolated with category schemes (when there are many categories) and seeing different behaviors depending on the schemes. Will post in another issue. |
Nice! Closing this one! Feel free to open another issue about related things. When there are more categories than cartocolors the renderer choose the palette with most colors available and it linearly interpolates between those. I think this is a good behavior in general, but it can be broken (bad implementation) and there can be many corner cases that aren't being looked upon. |
@davidmanzanares opened another issue with some questions (#129). Can you give me a deeper dive into the linear interpolation between colors? Maybe you have explained it to me before but I am seeing really weird results. |
@davidmanzanares
While testing the category ramp fix (#66), I noticed something else that I don't think is expected behavior.
Using some Airbnb data, there are 3 categories of the attribute
room_type
:Entire home/apt
,Private room
,Shared room
Using this syntax:
color: ramp($room_type,vivid)
I'd expect to see the first three colors in the scheme
vivid
for each of the types:Instead, what I'm seeing is this where the first color in the scheme is skipped and the third category
Shared room
being skipped altogether.On the other hand, if I define the style with
buckets
:color: ramp(buckets($room_type,"Entire home/apt", "Private room", "Shared room"),vivid)
I see the expected result for that syntax which is also what I would expect to see in the first rendering.
The text was updated successfully, but these errors were encountered: