Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

facet_wrap needs labeller parameter like facet_grid #25

Closed
hadley opened this Issue · 7 comments

6 participants

@hadley
Owner

No description provided.

@bbolker

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
Owner

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

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 wch referenced this issue from a commit in wch/ggplot2
@wch wch Allow parsing expressions in facet_wrap
Fixes #25
1062909
@peacej

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

@johnfrombluff

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

@hadley
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.