.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_datasets_plot_digits_last_image.py: ========================================================= The Digit Dataset ========================================================= This dataset is made up of 1797 8x8 images. Each image, like the one shown below, is of a hand-written digit. In order to utilize an 8x8 figure like this, we'd have to first transform it into a feature vector with length 64. See `here `_ for more information about this dataset. .. image:: /auto_examples/datasets/images/sphx_glr_plot_digits_last_image_001.png :class: sphx-glr-single-img .. code-block:: default print(__doc__) # Code source: Gaƫl Varoquaux # Modified for documentation by Jaques Grobler # License: BSD 3 clause from sklearn import datasets import matplotlib.pyplot as plt #Load the digits dataset digits = datasets.load_digits() #Display the first digit plt.figure(1, figsize=(3, 3)) plt.imshow(digits.images[-1], cmap=plt.cm.gray_r, interpolation='nearest') plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.339 seconds) **Estimated memory usage:** 8 MB .. _sphx_glr_download_auto_examples_datasets_plot_digits_last_image.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gh/scikit-learn/scikit-learn/0.22.X?urlpath=lab/tree/notebooks/auto_examples/datasets/plot_digits_last_image.ipynb :width: 150 px .. container:: sphx-glr-download :download:`Download Python source code: plot_digits_last_image.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_digits_last_image.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_