Hi all,
New to plotly and trying to work on a visualization that takes 3 dimensions of information to a 3-axis colorspace. The colorscaling example works great but only relies on a single dimension. Any way to involve all 3?
Thanks so much in advance!
Found out a helpful direction via the accepted forms in: https://www.w3schools.com/cssref/css_colors_legal.asp.
Three dimensions can be done via the hue-saturation-lightness (HSL) format, as in βhsl(100, 50%, 50%)β.
To base the color hsl off of the 3 axes I add (x, y and z) in the dataframe, I added a column βcolorβ like so:
df[βcolorβ] = df.apply(lambda row: βhsl(β + str(row.x) + β,β + str(row.y) + β%,β+ str(row.z) + β%)β, axis=1)