2

Are there any easy way to tell datashader that my lines should be colored based on some value column, so called multicolored lines shaded together?

my data is already separated with NaNs for the plotting

sd is a DASK from pandas: sd.tail()

x   y   vabs    vabs1
5137339 14.289062   51.994141   389.443665  172.533920
5137340 -55.431641  -3.410156   417.245514  144.485260
5137341 -113.472656 -57.730469  345.505646  173.973068
5137342 -145.548828 -94.755859  219.604645  201.809570
5137343 NaN NaN NaN NaN

dynspread(datashade(hv.Curve(sd),aggregator=ds.min('vabs'),normalization='log',cmap=plt.cm.gist_rainbow).options(width=1000,height=1000))

produces following: enter image description here

but I need to get similar effect like in:

enter image description here

this image is generated using the method described in matplotlib, which is very slow and non interactive.

Arman
  • 4,566
  • 10
  • 45
  • 66
  • Is the value column a set of discrete values (if so, how many?), or is it a continuous value you want to colormap continuously? – James A. Bednar Oct 22 '18 at 19:29
  • If it's only up to a few dozen discrete values, or if it's ok to discretize them, you can use the approach at the end of https://anaconda.org/jbednar/datashade_vs_rasterize . – James A. Bednar Oct 22 '18 at 19:32
  • Yes,those are some trajectories: each trajectory is sampled about 150 discreet points. And total ~1Mln particles x 150 samples in one case in another set I have more than 160Mlnx150. along each trajectory I have several values and I wich to have them as a color-shade along the trajectory. – Arman Oct 23 '18 at 09:43
  • I have similiar problem with particle data. I have tried other libraries: IPyVolume to name one of the closeset. But it falls over. I could write my own plotter but it's a lot of work - although I've managed around 8 million data points doing webgl solutions. I really need a standard that others can use via Jupyter Notebook. Struggling to find use cases for large data, quite a surprise! – Jamie Nicholl-Shelley Mar 03 '20 at 13:18

0 Answers0