Description Usage Arguments Examples
Convert the default (all) when setting ggplot2's
facet_grid
to margins = TRUE
.
1 | label_rename_margin(newname = "Total")
|
newname |
The new strip.text name to overwrite (all). |
1 2 3 4 5 6 7 8 9 10 11 12 13 | mtcars2 <- mtcars
mtcars2$gear <- factor(mtcars2$gear)
ggplot(mtcars2, aes(cyl)) +
geom_point(stat="bin", size = 2, binwidth = 2,
aes(shape = gear), position = "stack") +
facet_grid(carb ~ gear, margins = TRUE,
labeller=label_rename_margin("Total"))
ggplot(mtcars2, aes(cyl)) +
geom_point(stat="bin", size = 2, binwidth = 2,
aes(shape = gear), position = "stack") +
facet_grid(carb ~ gear, margins = "gear",
labeller=label_rename_margin("Total"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.