You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following colormaps, as well as their respective reversed (*_r) versions are available
Perceptually uniform sequential colormaps
Monochromatic sequential colormaps
Miscellaneous
Installation
with pip
python -m pip install cmyt
or with conda
conda install -c conda-forge cmyt
Usage
cmyt integrates with matplotlib in a similar fashion to
cmocean or
cmasher
importnumpyasnpimportmatplotlib.pyplotaspltimportcmyt# that's it !# generate example dataprng=np.random.RandomState(0x4D3D3D3)
noise=prng.random_sample((100, 100))
x, y=np.mgrid[-50:50, -50:50]
z=5*np.exp(-(x**2+y**2) /1000)
# setup the figurefig, ax=plt.subplots()
ax.set(aspect="equal")
# now we can refer to cmyt colormaps as stringsim=ax.pcolormesh(x, y, z+noise, cmap="cmyt.arbre", shading="flat")
fig.colorbar(im, ax=ax)
# alternatively, cmyt maps can also be imported as objectsfromcmytimportpastelfig, ax=plt.subplots()
ax.set(aspect="equal")
im=ax.contourf(x, y, z+noise, cmap=pastel)
fig.colorbar(im, ax=ax)
A gallery of comparable examples using all colormaps from cmyt is available in the test directory.