mpl_toolkits.axes_grid1.axes_rgb.RGBAxes#

class mpl_toolkits.axes_grid1.axes_rgb.RGBAxes(*args, pad=0, **kwargs)[source]#

Bases: object

4-panel imshow (RGB, R, G, B).

Layout:

┌───────────────┬─────┐
│               │  R  │
│               ├─────┤
│      RGB      │  G  │
│               ├─────┤
│               │  B  │
└───────────────┴─────┘

Subclasses can override the _defaultAxesClass attribute. By default RGBAxes uses mpl_axes.Axes.

Attributes:
RGB_defaultAxesClass

The Axes object for the three-channel imshow.

R_defaultAxesClass

The Axes object for the red channel imshow.

G_defaultAxesClass

The Axes object for the green channel imshow.

B_defaultAxesClass

The Axes object for the blue channel imshow.

Parameters:
padfloat, default: 0

Fraction of the Axes height to put as padding.

axes_classAxes

Axes class to use. If not provided, _defaultAxesClass is used.

*args

Forwarded to axes_class init for the RGB Axes

**kwargs

Forwarded to axes_class init for the RGB, R, G, and B Axes

imshow_rgb(r, g, b, **kwargs)[source]#

Create the four images {rgb, r, g, b}.

Parameters:
r, g, barray-like

The red, green, and blue arrays.

**kwargs

Forwarded to imshow calls for the four images.

Returns:
rgbAxesImage
rAxesImage
gAxesImage
bAxesImage

Examples using mpl_toolkits.axes_grid1.axes_rgb.RGBAxes#

Showing RGB channels using RGBAxes

Showing RGB channels using RGBAxes

Showing RGB channels using RGBAxes