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

Make it easier to plot distributions of categorical data #998

Closed
MarcSkovMadsen opened this issue Dec 2, 2022 · 0 comments · Fixed by #1002
Closed

Make it easier to plot distributions of categorical data #998

MarcSkovMadsen opened this issue Dec 2, 2022 · 0 comments · Fixed by #1002

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Dec 2, 2022

Trying to contribute to pythonplot.com during the PyData Global 2022 I realized that it might be difficult for users to figure out how to plot a distribution of a categorical variable.

hvPlot (and Pandas) follows the definition of histogram: A histogram is an approximate representation of the distribution of numerical data.

image

Plotly on the other hand does not care about that. They just make it easy to plot for their users

image

We should also make this easier for our users. We could

  • Point out in the histogram reference guide that a histogram is only for numerical data.
  • Provide an example of a distribution plot for categorical variable
  • Document this in docstrings
  • Improve the error message if the user provides a categorical variable. It is really, really hard to understand the error message right now.

Or maybe just support categorical parameters in .hvplot.hist.

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

Successfully merging a pull request may close this issue.

1 participant