Skip to content
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

Move visualization functions to plotly and get rid of matplotlib dependency #348

Closed
npatki opened this issue Apr 14, 2023 · 0 comments · Fixed by #368
Closed

Move visualization functions to plotly and get rid of matplotlib dependency #348

npatki opened this issue Apr 14, 2023 · 0 comments · Fixed by #368
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link

npatki commented Apr 14, 2023

Problem Description

Other libraries in the SDV ecosystem are using plotly to generate visuals. For example, the SDMetrics library offers visualization utilities using plotly.

However, the Copulas library still uses matplotlib. It would be nice to unify all visualizations to using plotly:

  1. Plotly is interactive. You can zoom into specific areas, as well as toggle legend items on/off
  2. We want to limit the number of external dependencies in the SDV ecosystem, as it makes it harder to maintain and forces us to make more frequent updates

Expected behavior

See Copulas Visualization Methods. Some directly correspond to SDMetrics so we can use the same graphing interface.

  • copulas.visualization.compare_1d is equivalent to sdmetrics.utils.get_column_plot
  • copulas.visualization.hist_1d can use the same visualization as above, but it only has 1 data series (color)
  • copulas.visualization.compare_2d is equivalent to sdmetrics.utils.get_colunn_pair_plot
  • copulas.visualization.scatter_2d can use the same visualization as above but it only has 1 data series (color)
  • copulas.visualization.compare_3d can use the plotly 3D scatter plots
  • copulas.visualization.scatter_3d can use the same 3D scatter plot as above
  • copulas.visualization.side_by_side: This may be a candidate for deprecation. Since plotly is interactive, there is no need to pass in extra kwargs

Additional context

To keep things consistent, all visualization functions should also make the following changes:

  1. Return the plotly.figure object instead of just showing it. If a user gets access to the object, they can make any modifications they like to the visualization
  2. Use the same color scheme as the SDMetrics visualizations for consistency
  3. Update any titles to accurately reflect what is being shown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants