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

label_bquote() not working with column facet #3333

Closed
yudong862 opened this issue May 16, 2019 · 3 comments
Closed

label_bquote() not working with column facet #3333

yudong862 opened this issue May 16, 2019 · 3 comments

Comments

@yudong862
Copy link

The following gives row facets, which works with label_bequote():

library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg)) + geom_point()
p <- p + facet_grid(vs ~ ., labeller = label_bquote('yy'~.(vs)~'V'))

If do column facets:

library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg)) + geom_point()
p <- p + facet_grid(. ~ vs, labeller = label_bquote('yy'~.(vs)~'V'))

label_bquote() will be ignored.

@paleolimbot
Copy link
Member

paleolimbot commented May 17, 2019

label_bquote() has both rows and cols arguments! You'll need to specify which is which to get it working with facet_grid().

library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg)) + geom_point()
p + facet_grid(vs ~ ., labeller = label_bquote(rows = 'yy'~.(vs)~'V'))

p + facet_grid(. ~ vs, labeller = label_bquote(cols = 'yy'~.(vs)~'V'))

Created on 2019-05-17 by the reprex package (v0.2.1)

@yudong862
Copy link
Author

Thanks!!!

@lock
Copy link

lock bot commented Nov 13, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants