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

Graph list/tracker #122

Open
adamerose opened this issue Mar 18, 2021 · 7 comments
Open

Graph list/tracker #122

adamerose opened this issue Mar 18, 2021 · 7 comments

Comments

@adamerose
Copy link
Owner

I've started compiling a list of all the useful plots I could think of with examples and whether it is available in PandasGUI:

https://docs.google.com/spreadsheets/d/1ORw1GWTent5NJmIf23Co7EPTBBjNyC1VCHfi9yHwf7A/edit#gid=0

If you have any feedback or knowledge to contribute, feel free to share here

@fdion
Copy link
Contributor

fdion commented Mar 18, 2021

I just spent a long while typing a bunch of stuff and github just lost the whole comment. Maybe I'll have the courage to start over in a few days. grr.

@fdion
Copy link
Contributor

fdion commented Mar 18, 2021

top 2 points:

  • plotly express has marginal keyword and error keyword (for x and y) so you already support marginal plots and error bars (point plot in your list).
  • planning to do lines_3d but at the same time perhaps 3d should just be a Z under lines and scatter...

@fdion
Copy link
Contributor

fdion commented Mar 24, 2021

Ok, here is the first part, covering what you already had in your spreadsheet. In the next few days I'll post the rest (all the other important chart types that are missing).

  • area chart: (px: https://plotly.com/python-api-reference/generated/plotly.express.area.html) can do stacked with groupnorm=None or percent or fraction
  • box: is mainly about distribution, skewness and kurtosis, outliers, not specific to categorical
  • stripe chart: (px: https://plotly.com/python-api-reference/generated/plotly.express.strip.html) - basically reusing boxplot points (points='all' on box-and-whisker plot)
  • swarmplot: no px or plotly implementation that I know of.
  • pointplot: plotly instead has error_x, error_y etc in px - works in scatter, bar, lines etc
  • countplot: px histogram does that
  • KDE: plotly (not express) distplot has support for this
  • ECDF: that's a big one that is missing. Both CDF and CCDF would be needed, with linear and semilog
  • 3d lines: px supports basic 3d lines but will need expanding (just like lines)
  • 3d surface: plotly graph_objects (go) has Surface
  • 3d mesh: plotly go also has a 3d mesh object, but I can't think of why you would need this for EDA vs surface. About the only use case I can think of is displaying a 3d convex hull as part of clustering / anomaly detection
  • 3d bars: not available in plotly

Missing in 3d:

  • 3d facets: make_subplots would allow for this. Given that, the only difference between scatter and scatter 3d and line and line 3d would be a z axis. Adding Z to scatter and line would remove the extra selection of plot, making for a simplified selection and better UX by the end user

Some more observations:

  • clustermap: really a heatmap with a dendrogram. This is for cluster analysis and should be part of an overall cluster analysis strategy (clustering, dimensionality reduction etc). Plotly figure factory has dendrogram support and plotly has heatmaps, would be a matter of combining the two (not sure how easy/hard that would be, with plotly you never know anything about complexity until you do it).
  • edge rugplot: marginal plots are already available with px.
  • edge histogram: same. also marginal box plot and marginal violin.
  • regression: scatter has trendlines (lowess and OLS - see: New settings for custom kwargs #104)
  • sankey: plotly go has a Sankey object
  • candlestick: cufflinks has that and a few more time series charts. Its Bollinger bands are particularly pretty. I use cufflinks in stemgraphic for certain visualizations ( https://dionresearch.github.io/stemgraphic/modules.html#module-stemgraphic.alpha ). That was before plotly express existed so made my life easier than pure plotly:

pairs

  • chord diagram. Implemented an interactive chord diagram for correlations in visu.ai, that was super hard, and it doesn't work with current plotly. Haven't had the time to revisit this yet.

All the polar plots in plotly express are "sort of" there. They don't allow multiple variables on r or theta, and that's basic functionality.

Speaking of polar, Smith charts are nice for RF / microwave analysis. Got pinged on twitter for feedback on that, apparently plotly is adding that to plotly express.

@fdion
Copy link
Contributor

fdion commented Mar 28, 2021

Other charts not covered in your spreadsheet that I've either used for business or toying with in the past 1-2 years:

And one more python library amd a few plot types I have to mention: yellowbrick maintained by @bbengfort, @rebeccabilbro et al. It doesn't output interactive figures, just matplotlib, but I've been experimenting with a similar approach I used with my Hotelling package to add support for plotly figs to YB. Has things like:

  • silhouette plot
  • residuals
  • rank2d etc

All useful in EDA, and a whole lot of other things that are much more ML focused.

Ok, done for now...

@fdion
Copy link
Contributor

fdion commented Mar 29, 2021

BTW, on spectral plot, the example I linked was seaborn, and it's a distribution plot (kde ridge) but most of the time spectral plots are not for looking at distributions, but at frequency spectrums

@fdion
Copy link
Contributor

fdion commented Apr 10, 2021

Worked on plotly this week, sent a PR to fix matplotlylib so it works with current matplotlib (4.3.1) to generate interactive plots. This will help to enable several plots in pandasgui @adamerose. Downside is I didn't make any progress on pandasgui this week.

@adamerose
Copy link
Owner Author

Just found this very interesting site, posting here for future reference

https://www.data-to-viz.com/

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

2 participants