question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add color_range argument to scatter

See original GitHub issue

Being 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:closed
  • Created 4 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, May 8, 2019

I just pushed v0.1.9 to PyPI with the fix… pushing to conda-forge in a bit 😃

1reaction
nicolaskruchtencommented, May 8, 2019

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 the px 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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found