plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Parcoords line opacity, rgba color not working

Open noob-procrastinator opened this issue 5 years ago • 7 comments

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.

newplot(3)

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)

noob-procrastinator avatar Aug 10 '20 11:08 noob-procrastinator

It also doesn't work using the Line constructor and assigning an rgba color, or by defining an rgba colorscale.

noob-procrastinator avatar Aug 11 '20 08:08 noob-procrastinator

Yes, I believe the docstring is incorrect in this case, and only RGB is supported.

nicolaskruchten avatar Aug 11 '20 13:08 nicolaskruchten

Is this achievable through another manor? I can see when doing a brush selection, the unselected lines go transparent and dark

noob-procrastinator avatar Aug 28 '20 16:08 noob-procrastinator

This bug has not been fixed, right? And I guess the plan is to leave it as it is, correct?

natchoeli avatar Feb 16 '23 12:02 natchoeli

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)

alexcjohnson avatar Feb 22 '23 22:02 alexcjohnson

Is there any updates?

noob-procrastinator avatar Dec 12 '23 17:12 noob-procrastinator

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.

Coding-with-Adam avatar Dec 12 '23 21:12 Coding-with-Adam