Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

facet_grid fail with a category type #665

Description

@mxardre

`
File "", line 102, in
print(p)

File "python3.7/site-packages/ggplot/ggplot.py", line 116, in repr
self.make()

File "python3.7/site-packages/ggplot/ggplot.py", line 636, in make
layer.plot(ax, facetgroup, self._aes, **kwargs)

File "python3.7/site-packages/ggplot/geoms/geom_histogram.py", line 48, in plot
params['bins'] = np.arange(np.min(x), np.max(x) + self.params['binwidth'], self.params['binwidth'])

ValueError: arange: cannot compute length`

I am trying to do a facet_grid of a dataframe. To order the facet I have follow this : https://stackoverflow.com/questions/42763667/ordering-the-facet-in-python-ggplot
This throw the error above and the facet fail.
Does the pb come from the category type of the pd.dataframe?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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