Draws rectangles with rounded corners in conjuction with the theme system.
element_rect_round( fill = NULL, colour = NULL, size = NULL, linetype = NULL, color = NULL, inherit.blank = FALSE, radius = unit(0.1, "snpc") )
| fill | Fill colour. |
|---|---|
| colour | Line/border colour. Color is an alias for colour. |
| size | Line/border size in mm; text size in pts. |
| linetype | Line type. An integer (0:8), a name (blank, solid, dashed, dotted, dotdash, longdash, twodash), or a string with an even number (up to eight) of hexadecimal digits which give the lengths in consecutive positions in the string. |
| color | Line/border colour. Color is an alias for colour. |
| inherit.blank | Should this element inherit the existence of an
|
| radius | A |
| x | A single number specifying size relative to parent element. |
| lineend | Line end Line end style (round, butt, square) |
A list of the class element_rect_round.
# Adding rounded rectangles to geoms and theme elements ggplot(mpg, aes(class, colour = class)) + geom_bar_theme(element = element_rect_round(radius = 0.25)) + facet_grid(~ year) + theme( strip.background = element_rect_round(radius = 0.5), panel.background = element_rect_round() )