Add color_range argument to scatter
See original GitHub issueBeing able to set the color range for continuous color columns would be very useful. e.g.:
px.scatter(
tips, x="total_bill", y="tip",
color="size", facet_col="sex",
color_continuous_scale=px.colors.sequential.Viridis,
color_min=0, color_max=10 # <--- new args support requested
)
Currently the behavior seems to use different color scales across row and column facets, which means that the single color-scale legend is inaccurate.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
Setting different color for each series in scatter plot on matplotlib
The normal way to plot plots with points in different colors in matplotlib is to pass a list of colors as a parameter....
Read more >Matplotlib Scatter Plot Color - Python Guides
By adding a colorbar to a scatter plot, we provide a range for numbers to colors based on the data plotted in the...
Read more >How To Specify Colors to Scatter Plots in Python
Learn how to specify colors to scatterplot in Seaborn with two examples: one with color list and second with color dictionary.
Read more >How to create a Scatter Plot with several colors in Matplotlib?
A 2-D array in which the rows are RGB or RGBA. Example: Using the c parameter to depict scatter plot with different colors...
Read more >Matplotlib Scatter Plot Color by Category in Python - Kanoki.org
Matplotlib scatter has a parameter c which allows an array-like or a list of colors. The code below defines a colors dictionary to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just pushed v0.1.9 to PyPI with the fix… pushing to conda-forge in a bit 😃
the
None
thing is unfortunately not well-supported in plotly.js so that likely won’t work out of the box but we might be able to emulate it at thepx
level 😃And thanks for the kind words! It’s also the plotting package I have always wanted (modulo the occasional 🙈 bug like this one!) and it’s nice to know I’m not the only one 😃