I have some time series data whereby each column signifies a y value, and the density for that y, per time, are the values within that column e.g.:
dt | y=100 | y=200 | y=300 | y=400 |
---|---|---|---|---|
2018-06-04 | 10 | 50 | 5 | 0 |
2018-06-05 | 10 | 50 | 0 | 25 |
2018-06-06 | 20 | 50 | 0 | 25 |
2018-06-07 | 20 | 50 | 0 | 25 |
The values in the columns are the densities for the given y, through time.
I would like to plot this so that at y=100, between dt=2018-06-06 -> 2018-06-06 the line has a color red (for the value 10), then for y=100 between dt=2018-06-06 -> 2018-06-07 the line has the color blue for the value 20, and so on.
In essence, it is a histogram through time, where the density for a given y value between the times dt is signified by the colour of the line at that point.
I can achieve it quite easily with some splitting of the data and drawing some series in either matplotlib or plotly, which works well for small datasets. When my data becomes large e.g. 500 columns and 100k timestamps, then these fall over. I would like to use datashader, but having read the documentation I am not sure how to achieve what I want.
Is there some clever trick involving categorical variables I can use to achieve what I want? Or is there some way I can transform my data to better achieve what I want.