8000 Can't facet on variable with more than 9 levels · Issue #663 · yhat/ggpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Can't facet on variable with more than 9 levels #663
Open
@shelmich

Description

@shelmich

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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0