legend: Add a legend

Description Usage Arguments Value Examples

View source: R/pipeFuncs.R

Description

Adds a legend based on the current slice series. Colour bars, contours, etc., are taken from the immediately preceding element.

Usage

1
legend(ssm, description = NULL)

Arguments

ssm

The slice series info, usually passed along the pipe and specified by the user

description

The text that will be used to describe the legend. Can be NULL, in which case the colour bar is shown without a description.

Value

The slices series for continuation down the pipe.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
sliceSeries(nrow = 8, begin=100, end=350) %>%
  anatomy(anatVol, low=700, high=1400) %>%
  addtitle("Anatomy") %>%
  sliceSeries() %>%
  anatomy() %>%
  overlay(stats, low=2, high=6, symmetric = T) %>%
  addtitle("Stats") %>%
  legend("t-statistics") %>%
  draw()

## End(Not run)

Mouse-Imaging-Centre/MRIcrotome documentation built on Feb. 27, 2020, 1:31 p.m.