Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

Y oriented ColorScale in normalized scatter

Hi

I’m struggling with ColorScale, read officials docs but fail to Y_orient ColorScale in my [0.0 - 1.0] normalized scatter plot.

The snippet.

‘marker’: {‘size’: 20, ‘color’: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.7, 0.8, 0.9, 1.0,], ‘colorscale’: [[0.0, ‘rgb(0,0,255)’], [1.0, ‘rgb(255,0,0)’]], ‘cmin’: 0.0, ‘cmax’: 1.0}

The output.
X_colorscale-0

JB.

@JBdata31
Y-oriented is the only direction to set the colorbar. X- oriented, i e horizontal colorbar, cannot be drawn.

Thanks for answer.

Maybe my post lacks of precision, but I don’t talk about ColorMap but ColorScale.
Anyway, keep on working I pass, this post is helpful.

Here’s the snippet:

'marker': {'size': 5, 'color': « x data », 'cmin': « min of x data », 'cmax': « max of x data », 'colorscale': [[0.0, ‘rgba(0, 0, 255, 1.0)’, [1.0, 'rgba(255, 0, 0, 1.0)']], 'showscale': True, 'colorbar': {'thickness': 10, 'y': 10, 'ypad': 0, 'title': '', 'titleside': 'bottom', 'outlinewidth': 1, 'outlinecolor': 'black', 'tickfont': {'size': 12, 'color': 'black'}}}

The result is perfect.

X_colorscale-1
X_colorscale-2

Without a clear definition of Colorscale orientation it was difficult to understand what you meant by xaxis oriented. The horizontal arrow made me think at colorbar. What you wanted know was “how to reverse a colorscale”.