Skip to content

facet_wrap dir='v', ncol=N gives N rows instead of N cols #163

Closed

Description

@jdanbrown

A normal facet_wrap using the default dir='h':

(mpg
    .pipe(ggplot)
    + aes(x='displ', y='hwy')
    + facet_wrap('class', dir='h', ncol=4)
    + geom_point()
)

image

When you use dir='v', ncol=4, you get 4 rows instead of 4 cols:

(mpg
    .pipe(ggplot)
    + aes(x='displ', y='hwy')
    + facet_wrap('class', dir='v', ncol=4)
    + geom_point()
)

image

As a workaround, you can switch to dir='v', nrow=4 to get 4 cols:

(mpg
    .pipe(ggplot)
    + aes(x='displ', y='hwy')
    + facet_wrap('class', dir='v', nrow=4)
    + geom_point()
)

image

>>> plotnine.__version__
'0.3.0+76.gdb4acba'

Activity

  1. added a commit that references this issue on Jul 29, 2018
    8f701ae
  2. jdanbrown commented on Jul 31, 2018

    @jdanbrown
    ContributorAuthor

    🎉Thanks! I love this project and your attentiveness to it!

  3. added a commit that references this issue on Sep 5, 2024
    3c23a55
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions