plotly.py
plotly.py copied to clipboard
Parcoords line opacity, rgba color not working
The documentation specifies that the parcoords' line argument color can be a an rgba string. This doesn't work though and the lines remain a solid color as if using only the rgb part.

import plotly.express as px
import plotly.graph_objects as go
iris = px.data.iris()
fig = go.Figure(
data=go.Parcoords(
line_color="rgba(100,00,0,0.1)",
dimensions=list([
dict(label='sepal_length', values=iris.sepal_length),
dict(label='sepal_width', values=iris.sepal_width),
dict(tickvals=[1, 2, 3],
label='species', values=iris.species_id,
ticktext=iris.species_id.unique()),
]))
)
fig.write_html('parallel.html', auto_open=True)
It also doesn't work using the Line constructor and assigning an rgba color, or by defining an rgba colorscale.
Yes, I believe the docstring is incorrect in this case, and only RGB is supported.
Is this achievable through another manor? I can see when doing a brush selection, the unselected lines go transparent and dark
This bug has not been fixed, right? And I guess the plan is to leave it as it is, correct?
We'd welcome a PR to add RGBA/opacity support to parcoords lines in https://github.com/plotly/plotly.js - but until that happens this is just a documentation bug (albeit a fairly subtle one, as currently we don't have a way in plotly.js/plotly.py to designate colors as not supporting opacity)
Is there any updates?
hi @noob-procrastinator Would you be interested in creating a PR for this, as Alex commented above?
Once a PR is created, we would tie it to this issue so everyone is updated on the progress.