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.

Support for line width/color array?

See original GitHub issue

If there are multiple paths in a single trace (separated by null(s)), it could be useful to have a different stroke-width for each path. This way, I could solve this issue, without having to draw a separate trace for each line.

Minimal example here – http://codepen.io/cpsievert/pen/wMzdME

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:26
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

24reactions
cpsievertcommented, Mar 9, 2016

In addition to https://plot.ly/r/reference/#scatter-line-width accepting a data array, it’d also be useful to have https://plot.ly/r/reference/#scatter-line-color accept a data array, so I can convert a plot like this:

qplot(data = economics, x = date, y = unemploy, colour = unemploy, geom = "line")

rplot

15reactions
akhmerovcommented, Aug 7, 2018

@etpinard, Re:

I’m not 100% convinced this is worth implementing.

One reasonable and potentially important application for varied line style (both width and color) is the network graph (https://plot.ly/python/network-graphs/).

The common use case is to use the line width and/or color to represent the weight of the connection, see e.g. this plot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Explicitly specifying line colors when plotting a matrix
This has bugged me for years, but I have circumvented it by unrolling the matrix into a number of vectors that I plot...
Read more >
colarray: a graphical array where color and line width can be set
This abstraction creates a regular Pd graphical array, where color and line width can be set. Download: colarray.zip The attributes of the ...
Read more >
Layers | Style Specification | Mapbox GL JS
This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px...
Read more >
Thick line geometry — pythreejs 2.4.1 documentation
Since WebGL does not guarantee support for line thickness greater than 1 for GL ... normalized=False), 'color': BufferAttribute(np.array([ [1, 0, 0], [1, 0, ......
Read more >
Applying styles and colors - Web APIs | MDN
miterLimit = max miterLength / lineWidth = 1 / sin ( min θ / 2 ); The default miter limit of 10.0 will...
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