ScatterWidget return labels instead of colors#20
ScatterWidget return labels instead of colors#20Dristro wants to merge 1 commit intokoaning:mainfrom
Conversation
Returning the labels insead of the colors when using .data_as_X_y. Its more usefull imo.
|
I need to think about this one a bit. I don't mind also having the labels in there but I think we want the colors too if we want to make matplotlib charts with the same data that have the same colors as the drawing widget. |
|
I see your point. Would it help to introduce two separate properties Alternatively, From my experience, I tend to use labels more than colors, so having that flexibility would be useful. What do you think? |
|
I guess it makes sense to return actual labels for Could you add a unit test for this PR? |
Noticed that the
.data_as_pandasreturns a df containing both colors and labels. Whereas the.data_as_X_yreturns colors, which isn't very useful when interpreting and working with the data.Update: Modified the ScatterWidget class so that
.data_as_X_ynow returns labels instead of colors.Question: Was there a specific reason for returning color instead of label? Happy to discuss if there's a particular use case for it!