.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_intro_numpy_auto_examples_plot_basic2dplot.py: 2D plotting =========== Plot a basic 2D figure .. image:: /intro/numpy/auto_examples/images/sphx_glr_plot_basic2dplot_001.png :class: sphx-glr-single-img .. code-block:: python import numpy as np import matplotlib.pyplot as plt image = np.random.rand(30, 30) plt.imshow(image, cmap=plt.cm.hot) plt.colorbar() plt.show() **Total running time of the script:** ( 0 minutes 0.025 seconds) .. _sphx_glr_download_intro_numpy_auto_examples_plot_basic2dplot.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_basic2dplot.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_basic2dplot.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_