with_blur | R Documentation |
This filter adds a blur to the provided ggplot layer. The amount of blur can be controlled and the result can optionally be put underneath the original layer.
with_blur(x, sigma = 0.5, stack = FALSE, ...)
x |
A ggplot2 layer object, a ggplot, a grob, or a character string naming a filter |
sigma |
The standard deviation of the gaussian kernel. Increase it to apply more blurring. If a numeric it will be interpreted as given in pixels. If a unit object it will automatically be converted to pixels at rendering time |
stack |
Should the original layer be placed on top? |
... |
Arguments to be passed on to methods. See the documentation of supported object for a description of object specific arguments. |
Depending on the input, either a grob
, Layer
, list of Layer
s,
guide
, or element
object. Assume the output can be used in the same
context as the input.
Other blur filters:
with_motion_blur()
,
with_variable_blur()
library(ggplot2) ggplot(mtcars, aes(mpg, disp)) + with_blur(geom_point(data = mtcars, size = 3), sigma = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.