facet_wrap needs labeller parameter like facet_grid #25

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

Comments

Projects
None yet
6 participants
@hadley
Owner

hadley commented Dec 3, 2009

No description provided.

@bbolker

This comment has been minimized.

Show comment Hide comment
@bbolker

bbolker May 28, 2012

Contributor

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

Contributor

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

This comment has been minimized.

Show comment Hide comment
@hadley

hadley Jun 3, 2012

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.

Owner

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

This comment has been minimized.

Show comment Hide comment
@lselzer

lselzer Aug 16, 2012

Contributor

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?

Contributor

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

This comment has been minimized.

Show comment Hide comment
@peacej

peacej Jun 20, 2013

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

peacej commented Jun 20, 2013

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

@johnfrombluff

This comment has been minimized.

Show comment Hide comment
@johnfrombluff

johnfrombluff Sep 16, 2013

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

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

@jklontz

This comment has been minimized.

Show comment Hide comment
@jklontz

jklontz Oct 23, 2013

👍

jklontz commented Oct 23, 2013

👍

@hadley

This comment has been minimized.

Show comment Hide comment
@hadley

hadley Feb 24, 2014

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.

Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment