VEuPathDB / web-eda

Web browser code for EDA-based applications
Apache License 2.0
0 stars 0 forks source link

EDA viz - continuous variable overlays switch from gradient to discrete when heavily subsetted #1583

Open danicahelb opened 1 year ago

danicahelb commented 1 year ago

Data viz topic:

heavy subsetting switches the legend for a continuous variable from the gradient to the standard categorical colormap

See: GEMS1 scatterplot using BMI-for-age as overlay:

unsubsetted:

image

with heavy subsetting:

image
asizemore commented 1 year ago

yikes this looks like a bug. transferring to web-eda

moontrip commented 1 year ago

@danicahelb @asizemore I have checked this and looked into corresponding web-eda part. I tried to mimic the behavior and confirmed that it happened when the number of data points are small. What happens in this case is that the backend does not return gradient data (seriesGradientColorscale) to the frontend (perhaps due to the lack of data points to compute gradient level?). So, the frontend treats such a small number of data points as a normal plot.

Thus, I don't know what you want in this case without having the backend data. Perhaps current behavior is what it should be?

danicahelb commented 1 year ago

i dont think we want to keep the current behavior, it is very confusing

@moontrip what is a "small" number of data points? is the issue the number of data points or the number of unique overlay values for that small set of data points?

@d-callan can we adjust something on the backend?

d-callan commented 1 year ago

This should get fixed in plot.data in the short term, and this ticket transferred there. In the longer term we probably want the client to dictate which colormaps it'd like to use? That's probably worth a separate discussion and ticket.

moontrip commented 1 year ago

Thanks @d-callan for taking care of it. @danicahelb Honestly, I don't know exact condition that happens. From my various tests, it occurs when the number of data points is small, usually less than 8 points.

danicahelb commented 1 year ago

@d-callan i've made this placeholder ticket for the convo about the client dictating which colormap to use https://github.com/VEuPathDB/EdaNewIssues/issues/606