.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "glr_examples/view/plot_matshow.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_glr_examples_view_plot_matshow.py: ================================================= Plot matrix show ================================================= visualizes basically the matrix show .. GENERATED FROM PYTHON SOURCE LINES 8-11 .. code-block:: Python # Author: L.Kouadio # Licence: BSD-3-clause .. GENERATED FROM PYTHON SOURCE LINES 12-45 .. code-block:: Python import numpy as np from watex.view.mlplot import plot_matshow matshow_kwargs ={ 'aspect': 'auto', 'interpolation': None, 'cmap':'copper_r', } baseplot_kws ={'lw':3, 'lc':(.9, 0, .8), 'font_size':15., 'cb_format':None, #'cb_label':'Rate of prediction', 'xlabel': 'Predicted flow classes', 'ylabel': 'Geological rocks', 'font_weight':None, 'tp_labelbottom':False, 'tp_labeltop':True, 'tp_bottom': False } labelx =['FR0', 'FR1', 'FR2', 'FR3', 'Rates'] labely =['VOLCANO-SEDIM. SCHISTS', 'GEOSYN. GRANITES', 'GRANITES', '1.0', 'Rates'] array2d = np.array([(1. , .5, 1. ,1., .9286), (.5, .8, 1., .667, .7692), (.7, .81, .7, .5, .7442), (.667, .75, 1., .75, .82), (.9091, 0.8064, .7, .8667, .7931)] ) plot_matshow(array2d, labelx, labely, matshow_kwargs, **baseplot_kws ) .. image-sg:: /glr_examples/view/images/sphx_glr_plot_matshow_001.png :alt: plot matshow :srcset: /glr_examples/view/images/sphx_glr_plot_matshow_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.237 seconds) .. _sphx_glr_download_glr_examples_view_plot_matshow.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/watex/watex/0.3.X?urlpath=lab/tree/notebooks/glr_examples/view/plot_matshow.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_matshow.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_matshow.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_