geom_brain() plots dorsal/ventral sides when present in an atlas #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is almost the final PR for dorsal/ventral ggseg atlas support! This, along with using updated atlases generated with the associated update of ggsegExtra, would close #74 . I have tested it locally on a tentative update of the
ggsegGlasser
atlas (because I needed that atlas specifically for my current study).Major changes:
geom_brain()
works as expected (ish, see below) when an atlas including dorsal and ventral sides is used!!!position_brain()
should behave the same on existing atlases with only lat/med views (and subcort atlases).position_brain()
handles them in the following ways:stack_grid()
now stacks either 2x4 or 4x2default_order()
now expects dorsal/ventral views and spaces them properly, putting dorsal and ventral as the 3rd and 4th sides in the orderMinor changes:
side
argument ofgeom_brain()
can now take a vector of sides by way of callingmatch.arg(several.ok = TRUE)
. I imagine this functionality didn't make sense before with only 2 sides in cortical atlases, but with 4 possible sides now it makes sense to pick 2.Remaining bugs/weirdness:
get_sep()
uses the max bounding box across hemispheres, and since the dors/vent hemispheres are narrow in the x direction, they look very far from one another when placed using the bounding box for the lat/med hemispheres. I didn't want to change the functionality ofget_sep()
, so I'm leaving this weirdness in to see if you or a 8000 nyone else have a better idea of how to deal with it.geom_brain(side = c('dorsal', 'ventral'))
(or with either dorsal or ventral alone). When only "narrow" hemispheres are included, they get spaced appropriately closer together.