Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

facet_wrap needs labeller parameter like facet_grid #25

Closed
hadley opened this issue Dec 3, 2009 · 7 comments
Closed

facet_wrap needs labeller parameter like facet_grid #25

hadley opened this issue Dec 3, 2009 · 7 comments
Milestone

Comments

@hadley
Copy link
Member

@hadley hadley commented Dec 3, 2009

No description provided.

@bbolker
Copy link
Contributor

@bbolker bbolker commented May 28, 2012

bump? I would love to have this ... should I try to dig in and write it myself or is it likely to be tricky?

@hadley
Copy link
Member Author

@hadley hadley commented Jun 3, 2012

Hmmm, it shouldn't be too hard if you follow a parallel path to facet_grid. One roadblock is figuring out what arguments the function should accept.

@lselzer
Copy link
Contributor

@lselzer lselzer commented Aug 16, 2012

I'm trying to implent this. However, I cannot figure out why it doesn't render the parsed labels, instead I get expression(...).
Here's my modified code:
facet_strips.wrap <- function(facet, panel, theme) {
labeller <- match.fun(facet$labeller)

labels_df <- panel$layout[names(facet$facets)]
labels_df[] <- llply(labels_df, function(df) labeller(names(df), df))

labels <- apply(labels_df, 1, paste, collapse=", ")

list(t = llply(labels, ggstrip, theme = theme))
}

What am I missing?

wch added a commit to wch/ggplot2 that referenced this issue Sep 4, 2012
@peacej
Copy link

@peacej peacej commented Jun 20, 2013

Bump.. facet_wrap indeed needs a labeller parameter like facet_grid...

@johnfrombluff
Copy link

@johnfrombluff johnfrombluff commented Sep 16, 2013

If +1 is of any value, +1. If not, NULL

@jklontz
Copy link

@jklontz jklontz commented Oct 23, 2013

👍

@hadley
Copy link
Member Author

@hadley hadley commented Feb 24, 2014

This sounds like a great feature, but unfortunately we don't currently have the development bandwidth to support it. If you'd like to submit a pull request that implements this feature, please follow the instructions in the development vignette.

@hadley hadley closed this Feb 24, 2014
lionel- added a commit to lionel-/ggplot2 that referenced this issue Jun 14, 2015
lionel- added a commit to lionel-/ggplot2 that referenced this issue Jul 1, 2015
lionel- added a commit to lionel-/ggplot2 that referenced this issue Jul 28, 2015
lionel- added a commit to lionel-/ggplot2 that referenced this issue Jul 28, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants