Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
nilearn.plotting.displays.CutAxes¶
- class nilearn.plotting.displays.CutAxes(ax, direction, coord, radiological=False)[source]¶
An MPL axis-like object that displays a cut of 3D volumes.
- Parameters:
- draw_left_right(size, bg_color, **kwargs)[source]¶
Draw the annotation “L” for left, and “R” for right.
- draw_scale_bar(bg_color, size=5.0, units='cm', fontproperties=None, frameon=False, loc=4, pad=0.1, borderpad=0.5, sep=5, size_vertical=0, label_top=False, color='black', fontsize=None, **kwargs)[source]¶
Add a scale bar annotation to the display.
- Parameters:
- bg_colormatplotlib color:
str
or (r, g, b) value The background color of the scale bar annotation.
- size
float
, default=5.0 Horizontal length of the scale bar, given in units.
- units
str
, default=’cm’ Physical units of the scale bar (‘cm’ or ‘mm’).
- fontproperties
FontProperties
ordict
, optional Font properties for the label text.
- frameon
bool
, default=False Whether the scale bar is plotted with a border.
- loc
int
, default=4 Location of this scale bar. Valid location codes are documented in
AnchoredSizeBar
- pad
int
orfloat
, default=0.1 Padding around the label and scale bar, in fraction of the font size.
- borderpad
int
orfloat
, default=0.5 Border padding, in fraction of the font size.
- sep
int
orfloat
, default=5 Separation between the label and the scale bar, in points.
- size_vertical
int
orfloat
, default=0 Vertical length of the size bar, given in units.
- label_top
bool
, default=False If
True
, the label will be over the scale bar.- color
str
, default=’black’ Color for the scale bar and label.
- fontsize
int
, optional Label font size (overwrites the size passed in through the
fontproperties
argument).- **kwargs
Keyworded arguments to pass to
AnchoredOffsetbox
.
- bg_colormatplotlib color: