Fast Interactive Visualizations

Hi there,

currently I working on cytometry dataset processing. briefly saying, a high dimensional dataset (100k samples) with 10 channels (features). there will be a number of dual-channel scatter plots. I would like to view it on a channel A and channel B and find if there is a cluster on the top right part. if yes, I would like to select the cluster and than view this cluster on other dual-channel scatter plots. that’s it. I checked the example below. however, I wonder if there is a way to reuse all the plots rather than to generate them on each selection?

function reference: Part 3. Interactive Graphing and Crossfiltering | Dash for Python Documentation | Plotly

Hello @jakogau !
Welcome on the forum! :tada:

I’m not sure what you mean, but did you check the Patch class introduced couple of month ago:

You can use it to update only a part of your figure, like only your data points (x and y) keeping all other parameters as is.

3 Likes

Hello,

thanks for your reply. to clarify, my concern is that, rendering 12 scatter plots with at least 10k samples each really takes time. it’s around 10s in my implementation. I would like to quickly select some points on the first plot and show only them on others, which means I don’t need other calculation etc.

my previous solution is fetching the figure (json) and selection index and updating layout and returning the figure json obj, which means each time I do selection, I need to wait 10 seconds (perhaps).

your recommendation of Patch really helps. the performance gets really better. though think it’s quite not convenience to use this class.

Thanks again for your help :slight_smile:

Jako

Hi @jakogau !
If performance is an issue, you can try to use Scattergl() (if you didn’t):
https://plotly.com/python/line-and-scatter/#large-data-sets