Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Options to modify the opacity and width of each line #165

Open
shangzTJ opened this issue Feb 9, 2021 · 6 comments
Open

Options to modify the opacity and width of each line #165

shangzTJ opened this issue Feb 9, 2021 · 6 comments

Comments

@shangzTJ
Copy link

shangzTJ commented Feb 9, 2021

Hi, is it possible to modify the opacity and width of each line?

@danthe3rd
Copy link
Contributor

danthe3rd commented Feb 9, 2021

Hi @shangzTJ

Several questions to help you better:

  • Which lines are you talking about? The ones of the parallel plot, or the ones from the XY plot?
  • How do you use hiplot? (notebook? NPM package? within streamlit? with the included webserver ...?)

Thank you :)

@shangzTJ
Copy link
Author

shangzTJ commented Feb 9, 2021

Thank you for your quick reply @danthe3rd
The line refers to those in the parallel plot,and Hiplot is used in streamlit.

@danthe3rd
Copy link
Contributor

Indeed there is no way to change that in the parallel plot. I can work something out tho.
Can you tell me more about what you are trying to achieve? We want to get the best visualisation by default if possible

@shangzTJ
Copy link
Author

shangzTJ commented Feb 9, 2021

Thanks.
I have thousands of data to be visualized in parallel plot, which induces the line clutter problem. I attempted to solve the problem by calculating line densities (link) and adjusting the corresponding opacity or width.
As far as I know, many parallel plot applications require the configuration of line opacities, so will this option be provided in the future?

@danthe3rd
Copy link
Contributor

danthe3rd commented Feb 9, 2021

Sure I could add that. You want a global opacity, or a different opacity value for each line?
Do you compute the opacity as a function of the number of rows?

My concern is that you might want to have a different opacity depending on the number of rows displayed (when slicing for instance).

EDIT: Currently, opacity is computed as d3.min([2/Math.pow(n,0.3),1]) with n the number of rows displayed

@shangzTJ
Copy link
Author

(1) A different opacity value for each line is preferred, and is expected to be specified by a column in the input DataFrame.
(2) The opacity values are not calculated based on the number of all rows.

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

No branches or pull requests

2 participants