Package: ggseg 2.2.1.9007

Athanasia Mo Mowinckel

ggseg: Plotting Tool for Brain Atlases

Provides a 'ggplot2' geom and position for visualizing brain region data on cortical, subcortical, and white matter tract atlases. Brain atlas geometries are stored as polygon data, enabling seamless integration with the 'ggplot2' ecosystem including faceting, custom scales, and themes. Mowinckel & Vidal-Piñeiro (2020) <doi:10.1177/2515245920928009>.

Authors:Athanasia Mo Mowinckel [aut, cre], Didac Vidal-Piñeiro [aut], Ramiro Magno [ctb], Center for Lifespan Changes in Brain and Cognition, University of Oslo, Norway [cph]

ggseg_2.2.1.9007.tar.gz
ggseg_2.2.1.9007.zip(r-4.7-any)ggseg_2.2.1.9007.zip(r-4.6-any)ggseg_2.2.1.9007.zip(r-4.5-any)
ggseg_2.2.1.9007.tgz(r-4.6-any)ggseg_2.2.1.9007.tgz(r-4.5-any)
ggseg_2.2.1.9007.tar.gz(r-4.7-any)ggseg_2.2.1.9007.tar.gz(r-4.6-any)
ggseg_2.2.1.9007.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
ggseg/json (API)

# Install 'ggseg' in R:
install.packages('ggseg', repos = c('https://lifebrain.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ggsegverse/ggseg/issues

Pkgdown/docs site:https://ggsegverse.github.io

On CRAN:

Conda:

12.22 score 274 stars 1 packages 830 scripts 1.2k downloads 9 mentions 37 exports 33 dependencies

Last updated from:ccb3e8e98f. Checks:9 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK159
source / vignettesOK225
linux-releaseOK155
macos-releaseOK139
macos-oldrelOK103
windows-develOK115
windows-releaseOK125
windows-oldrelOK122
wasm-releaseOK111

Exports:annotate_brainasegbrain_joinbrain_test_plotcoord_braindkgeom_braingeom_brain_sfGeomBrainggsegposition_brainposition_brain_sfreposition_brainscale_brainscale_brain_manualscale_brain2scale_color_brainscale_color_brain_manualscale_color_brain2scale_colour_brainscale_colour_brain_manualscale_colour_brain2scale_continous_brainscale_fill_brainscale_fill_brain_manualscale_fill_brain2scale_labs_brainscale_x_brainscale_y_brainstat_brainStatBrainsuittheme_braintheme_brain2theme_custombraintheme_darkbraintracula

Dependencies:clicpp11dplyrfarvergenericsgeometriesggplot2ggseg.formatsgluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigpurrrR6RColorBrewerRcpprlangS7scalessfheadersstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Getting started with ggseg
What's in a brain atlas | Your first brain plot | Arranging views | Showing only certain hemispheres or views | Plotting your own data | Faceting | Highlighting specific regions | Scales and themes | Going further | Finding more atlases

Last update: 2026-08-05
Started: 2018-08-30

How geom_brain() works
The brain shape is drawn by a stat | Repeated regions are combined | Faceting comes for free | Colour, including bins, is just a scale | The three pieces, if you want to build on them

Last update: 2026-08-05
Started: 2026-07-27

Plotting external data
How matching works | A minimal example | Constraining matches with extra columns | Faceting across groups | Troubleshooting | Full control with sf

Last update: 2026-08-05
Started: 2026-02-19

Arranging brain views
Cortical atlases | Stacking all views | Subcortical and tract atlases | Horizontal and vertical | Grid layouts | Picking specific views | Grouping by slice type | Adding view labels | Zooming in on regions of interest | Focus on the regions in your data | Name the focus regions explicitly | Control the margin with zoom_pad | Dropping the grey context | The sf workflow

Last update: 2026-06-15
Started: 2026-02-19

Reading FreeSurfer stats files
Reading a single stats file | Reading stats files across subjects | Reading FreeSurfer stats tables | Cleaning label suffixes | Filtering non-region rows

Last update: 2026-06-15
Started: 2026-02-19

Readme and manuals

Help Manual

Help pageTopics
Add view labels to brain atlas plotsannotate_brain
Join user data with a brain atlasbrain_join
Render a brain atlas with default snapshot stylingbrain_test_plot
Keep brain shapes undistortedcoord_brain
Plot brain atlas regionsGeomBrain geom_brain StatBrain
Arrange brain atlas viewsposition_brain
Reposition brain slicesreposition_brain
Colour and fill scales from brain atlas palettesscale_brain scale_color_brain scale_colour_brain scale_fill_brain
Manual colour and fill scales for brain plotsscale_brain_manual scale_color_brain_manual scale_colour_brain_manual scale_fill_brain_manual
Deprecated scale functionsscale_brain2 scale_brain2-deprecated scale_color_brain2 scale_colour_brain2 scale_fill_brain2
Axis and label scales for brain atlas plotsscale_continous_brain scale_labs_brain scale_x_brain scale_y_brain
Stat-first constructor for a brain atlas layerstat_brain
Themes for brain atlas plotstheme_brain theme_brain2 theme_custombrain theme_darkbrain