MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / figimage

Method figimage

lib/matplotlib/figure.py:3032–3127  ·  view source on GitHub ↗

Add a non-resampled image to the figure. The image is attached to the lower or upper left corner depending on *origin*. Parameters ---------- X The image data. This is an array of one of the following shapes: - (M, N): an im

(self, X, xo=0, yo=0, alpha=None, norm=None, cmap=None,
                 vmin=None, vmax=None, origin=None, resize=False, *,
                 colorizer=None, **kwargs)

Source from the content-addressed store, hash-verified

3030
3031 @_docstring.interpd
3032 def figimage(self, X, xo=0, yo=0, alpha=None, norm=None, cmap=None,
3033 vmin=None, vmax=None, origin=None, resize=False, *,
3034 colorizer=None, **kwargs):
3035 """
3036 Add a non-resampled image to the figure.
3037
3038 The image is attached to the lower or upper left corner depending on
3039 *origin*.
3040
3041 Parameters
3042 ----------
3043 X
3044 The image data. This is an array of one of the following shapes:
3045
3046 - (M, N): an image with scalar data. Color-mapping is controlled
3047 by *cmap*, *norm*, *vmin*, and *vmax*.
3048 - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
3049 - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
3050 i.e. including transparency.
3051
3052 xo, yo : int
3053 The *x*/*y* image offset in pixels.
3054
3055 alpha : None or float
3056 The alpha blending value.
3057
3058 %(cmap_doc)s
3059
3060 This parameter is ignored if *X* is RGB(A).
3061
3062 %(norm_doc)s
3063
3064 This parameter is ignored if *X* is RGB(A).
3065
3066 %(vmin_vmax_doc)s
3067
3068 This parameter is ignored if *X* is RGB(A).
3069
3070 origin : {'upper', 'lower'}, default: :rc:`image.origin`
3071 Indicates where the [0, 0] index of the array is in the upper left
3072 or lower left corner of the Axes.
3073
3074 resize : bool
3075 If *True*, resize the figure to match the given image size.
3076
3077 %(colorizer_doc)s
3078
3079 This parameter is ignored if *X* is RGB(A).
3080
3081 Returns
3082 -------
3083 `matplotlib.image.FigureImage`
3084
3085 Other Parameters
3086 ----------------
3087 **kwargs
3088 Additional kwargs are `.Artist` kwargs passed on to `.FigureImage`.
3089

Callers 12

imsaveFunction · 0.95
figimageFunction · 0.80
test_completeFunction · 0.80
test_indexed_imageFunction · 0.80
test_wrong_use_colorizerFunction · 0.80
test_figimageFunction · 0.80
test_jpeg_alphaFunction · 0.80
watermark_image.pyFile · 0.80
figimage_demo.pyFile · 0.80

Calls 6

get_dpiMethod · 0.95
set_size_inchesMethod · 0.95
set_arrayMethod · 0.45
set_alphaMethod · 0.45
set_climMethod · 0.45

Tested by 7

test_completeFunction · 0.64
test_indexed_imageFunction · 0.64
test_wrong_use_colorizerFunction · 0.64
test_figimageFunction · 0.64
test_jpeg_alphaFunction · 0.64