ggplot2
ggplot2 copied to clipboard
An implementation of the Grammar of Graphics in R
``` r library(ggplot2) df
This produces a nicely centred title (and centred legend text): ```r require(ggplot2) data(iris) ``` ```r ggplot(iris, aes(y = Sepal.Width, x = Petal.Width)) + geom_point(shape = 21, aes(fill = Species)) +...
see this issue: https://github.com/wilkelab/cowplot/issues/152 (reprex included) the key height gets stretched when using multiline key-labels OR bigger text size in the legend. this is not affected my manipulations of the...
When using `scale_color_gradient2` with `trans = "log10"`, I was expecting the `midpoint` to be transformed as well. The documentation does not specify how `midpoint` behaves under transformation. # Reproducible example...
As the title says, it seems that geom_bar does not interact with scale_fill_binned. I'm assuming this is because the fill aesthetic is ignored if a continuous variable is passed. I'm...
Usually `na.rm = TRUE` will hide the warnings of removing NAs. However when using `position_stack` with `geom_col`, the warning cannot be turned off. ```r df
See related discussion on [SO.](https://stackoverflow.com/q/58761704/4975218) `position_dodge()` doesn't dodge the `xend` aesthetic and as a consequence segments can't be dodged. In the reprex below, the desired effect is to connect the...
Hello, I was trying to produce a scatter plot with points labelled by the variable `text` and dodged by the color variable `group`. The `position_dodge()` function worked fine, as shown...
This issue is a follow-up on https://github.com/tidyverse/ggplot2/issues/2712#issue-335176790. The previously posted solution does not work when there are 3 grouping levels, in which case the geom_point and geom_boxplot layers no longer...
By default, ggplot2 reasonably clips long facet labels. While this can be turned off by manipulating the underlying grobs, it would be nice for some circumstances if you could set...