Skip to content

facet_wrap broken in new release #210

@jbloom

Description

@jbloom

The facet_wrap command is broken in the latest release (0.5.0): it only plots the data for the first facet.

See this example:

import pandas
import plotnine
from plotnine import *

print(f"Using plotnine {plotnine.__version__}")

df = pandas.DataFrame({'facet_var':['a', 'a', 'a', 'a', 'b', 'b', 'b'],
                        'hist_var':[1, 2, 3, 3, 3, 4, 5]})

print(df)

ggplot(df, aes('hist_var')) + geom_histogram(binwidth=1, center=0) + facet_wrap('~ facet_var')
Using plotnine 0.5.0
  facet_var  hist_var
0         a         1
1         a         2
2         a         3
3         a         3
4         b         3
5         b         4
6         b         5

output_0_1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions