Skip to content

free_y ignored with facet_grid('. ~ var'), but works with facet_grid('var ~ .') and facet_wrap() #58

Closed
@jdanbrown

Description

@jdanbrown
df = pd.DataFrame({'x': np.random.rand(100), 'y': np.random.rand(100)})
df['color'] = np.floor(df['y'] * 3).astype('str')
# Bad: free_y ignored
ggplot(df, aes('x', 'y', color='color')) + geom_point() + facet_grid('. ~ color', scales='free_y')

image

# Good
ggplot(df, aes('x', 'y', color='color')) + geom_point() + facet_grid('color ~ .', scales='free_y')

image

# Good
ggplot(df, aes('x', 'y', color='color')) + geom_point() + facet_wrap('color', scales='free_y')

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions