Skip to content

Add support for line width and opacity for parallel coordinates plot #3916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ccaloian opened this issue Oct 11, 2022 · 3 comments
Closed

Add support for line width and opacity for parallel coordinates plot #3916

ccaloian opened this issue Oct 11, 2022 · 3 comments

Comments

@ccaloian
Copy link

I would like to be able to control the line width for parallel coordinates plot, and this doesn't seem to be supported currently. As for other figure types, I would like to be able to set the line width and opacity as in the code below.

import plotly.graph_objects as go

fig = go.Figure(
    data=go.Parcoords( 
        dimensions=[
            dict(range=[0, 1], label="A", values=[0.1, 0.4, 0.5, 0.3]),
            dict(range=[3, 5], label="B", values=[3.8, 4.2, 4.9, 3.2]),
            dict(range=[0, 2], label="C", values=[0.1, 0.4, 1.5, 1.3]),
        ],
        line=dict(
            color="darkred",
            width=3,
            opacity=0.7,
        ),
    )
)

fig.show()

Current behaviour results in the following error

ValueError: Invalid property specified for object of type plotly.graph_objs.parcoords.Line: 'width'
@empet
Copy link

empet commented Oct 11, 2022

The trace type, parcoords, has been devised with a constant line width to ensure high performance for large parcoords plots. There is an opened issue here plotly/plotly.js#4504, you can follow for eventual updates.
To see what are the actual parcoords line attributes, inspect them, displayed by:
help(go.parcoords.Line).

@alexcjohnson
Copy link
Collaborator

plotly/plotly.js#2573 is the open issue, plotly/plotly.js#4504 was closed as duplicate. Unfortunately this is fairly tricky given the architecture parcoords uses for performance optimization and the feature set available to us in WebGL...

@ccaloian
Copy link
Author

Thanks @empet and @alexcjohnson. I'm closing this issue and follow plotly/plotly.js#2573.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants