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

Can't facet on variable with more than 9 levels #663

Open
shelmich opened this issue May 28, 2019 · 0 comments
Open

Can't facet on variable with more than 9 levels #663

shelmich opened this issue May 28, 2019 · 0 comments

Comments

@shelmich
Copy link

This code works:

import pandas as pd
from ggplot import *
df = pd.DataFrame(data = {'facet_var': [1,2,3,4,5,6,7,8,9,1], 'hist_var': [1,2,3,4,5,6,7,8,9,0]})
ggplot(aes(x='hist_var'), data = df) + geom_histogram() + facet_wrap('facet_var')

This code fails with error: Bin edges must be unique: array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,

import pandas as pd
from ggplot import *
df = pd.DataFrame(data = {'facet_var': [1,2,3,4,5,6,7,8,9,10], 'hist_var': [1,2,3,4,5,6,7,8,9,0]})
ggplot(aes(x='hist_var'), data = df) + geom_histogram() + facet_wrap('facet_var')

The only thing that has changed is removing the 0 from 10 in 'facet_var'.

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

1 participant