GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Installation
  • Documentation
  • Examples
  • Tutorials
  • Contributing

This view

  • Original page
  • New address

GeezerVison is showing matplotlib.org — matplotlib.pyplot.matshow — Matplotlib 3.1.2 documentation

You are reading an old version of the documentation (v3.1.1). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.matshow.html
Version 3.1.2
matplotlib
Fork me on GitHub

Navigation

  • index
  • modules |
  • next |
  • previous |
  • home| 
  • contents »
  • API Overview »
  • matplotlib.pyplot »
  • matplotlib.pyplot »

Quick search

Table of Contents

  • matplotlib.pyplot.matshow
    • Examples using matplotlib.pyplot.matshow

Related Topics

  • Documentation overview
    • API Overview
      • matplotlib.pyplot
        • matplotlib.pyplot
          • Previous: matplotlib.pyplot.margins
          • Next: matplotlib.pyplot.minorticks_off
Show Page Source

matplotlib.pyplot.matshow¶

matplotlib.pyplot.matshow(A, fignum=None, **kwargs)[source]¶

Display an array as a matrix in a new figure window.

The origin is set at the upper left hand corner and rows (first dimension of the array) are displayed horizontally. The aspect ratio of the figure window is that of the array, unless this would make an excessively short or narrow figure.

Tick labels for the xaxis are placed on top.

Parameters:
A : array-like(M, N)

The matrix to be displayed.

fignum : None or int or False

If None, create a new figure window with automatic numbering.

If a nonzero integer, draw into the figure with the given number (create it if it does not exist).

If 0, use the current axes (or create one if it does not exist).

Note

Because of how Axes.matshow tries to set the figure aspect ratio to be the one of the array, strange things may happen if you reuse an existing figure.

Returns:
image : AxesImage
Other Parameters:
**kwargs : imshow arguments

Examples using matplotlib.pyplot.matshow¶

../../_images/sphx_glr_matshow_thumb.png

Matshow

© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2018 The Matplotlib development team.
Last updated on Jan 05, 2020. Created using Sphinx 1.8.5. Doc version v3.1.1-79-g90d53b526.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.