.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plots/colormaps.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. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plots_colormaps.py: .. _exa-colormaps: Eelbrain Colormaps ================== Eelbrain adds some colormaps to `matplotlib's standard colormaps `_. In general, the colormaps come with an ``*-a`` ("alpha") version which uses transparency for low values instead of a solid color. For example, to use the ``polar`` map with transparency, use ``polar-a``. .. GENERATED FROM PYTHON SOURCE LINES 13-45 .. image-sg:: /auto_examples/plots/images/sphx_glr_colormaps_001.png :alt: Eelbrain colormaps :srcset: /auto_examples/plots/images/sphx_glr_colormaps_001.png :class: sphx-glr-single-img .. code-block:: Python import numpy as np import matplotlib.pyplot as plt gradient = np.linspace(0, 1, 256) gradient = np.vstack((gradient, gradient)) cmap_list = [ 'polar', 'xpolar', 'lpolar', 'lux', 'lux-gray', 'polar-lux', 'lux-purple', 'polar-lux-purple', ] nrows = len(cmap_list) figh = 0.35 + 0.15 + (nrows + (nrows - 1) * 0.1) * 0.22 fig, axs = plt.subplots(nrows=nrows, figsize=(6.4, figh)) fig.subplots_adjust(top=1 - .35 / figh, bottom=.15 / figh, left=0.2, right=0.99) axs[0].set_title('Eelbrain colormaps', fontsize=14) for ax, name in zip(axs, cmap_list): ax.imshow(gradient, aspect='auto', cmap=name) ax.text(-.01, .5, name, va='center', ha='right', fontsize=10, transform=ax.transAxes) for ax in axs: ax.set_axis_off() .. _sphx_glr_download_auto_examples_plots_colormaps.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: colormaps.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: colormaps.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: colormaps.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_