Line colorscale on scatter graph
See original GitHub issueHello,
I can’t make work the marker.line.colorscale property. I’m not sure how it should work, but what I can say is:
- using the
colorscale
property on lines as it is used on markers has no effect - if we use the property on a scatter graph with both lines and markers we have a bug (or I’m not using it properly?)
So is it possible to color a line following a colorscale on a scatter graph? How we do it?
Moreover the documentation is confusing, as it states the property line is under the mark one:
Sets the colorscale and only has an effect if
marker.line.color
is set to a numerical array.
Actually it seems not to be the case: http://codepen.io/anon/pen/OXJErp. Should the documentation states line.color
instead?
I can do a PR to fix the doc, but I want to be sure I’m not misleading first.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:27 (17 by maintainers)
Top Results From Across the Web
Create a gradient-colored scatter plot with color scale in ...
To display a scatter plot with data-based coloring and show a color scale for these points, complete the steps below: Select the scatter...
Read more >Scatter and line plots in R - Plotly
How to create line and scatter plots in R. Examples of basic and advanced scatter plots, time series line plots, colored charts, and...
Read more >Matplotlib - plot lines using same colormap as scatter
Solution seems to set up a scalarMap and use normalize ... import numpy as np import matplotlib.pyplot as plt %config ...
Read more >Colored line or scatter plot - File Exchange - MATLAB Central
plots a 2-D "line" with c-data as color. Makes a surface object and the colouring is controlled by the colormap. Examples: x =...
Read more >How to Color Scatter Plot Points in R ? - GeeksforGeeks
Now to change the colors of a scatterplot using plot(), simply select the column on basis of which different colors should be assigned...
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
Just here to note that I’d love to see this feature available in 2D.
Thanks for the very detailed issue.
In plotly.js, attributes under
marker.line
describe the marker points’ bordering line styling (example here) and have no effect on ascatter
trace’s line segments.At the moment, scatter
line
attributes do not support color scales nor per-data-point style setting (as mentioned in https://github.com/plotly/plotly.js/issues/147). In other words, there is no way to apply a colour gradient to a plotly.js line chart.Adding color scale support to line charts (possibly using svg gradient) would be a great addition to the library.