| coord_brain | R Documentation |
Fixes the aspect ratio so brains aren't stretched by the shape of the plotting window. [geom_brain()] adds 'coord_brain()' for you, so you rarely need to call it yourself – reach for it only to adjust the 'ratio' or 'clip' behaviour. You can safely add your own coord or stack several 'geom_brain()' layers; it steps aside cleanly.
coord_brain(ratio = 1, clip = "off", ...)
ratio |
Aspect ratio, expressed as 'y / x'. Defaults to '1', which keeps brain polygons undistorted. |
clip |
Should drawing be clipped to the panel extent ('"on"') or allowed to overflow ('"off"')? Defaults to '"off"' so region outlines at the panel edge are not cut. |
... |
Additional arguments passed to [ggplot2::coord_fixed()]. |
A ggplot2 coordinate system that registers as a default.
library(ggplot2)
## Not run:
poly <- ggseg.formats::as_polygon_atlas(dk())
# Equivalent to the default; shown explicitly:
ggplot() +
geom_brain(atlas = poly) +
coord_brain()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.