Colormap reference#

Plot hyoga altitude and relief colormaps.

Hyoga colormaps
import numpy as np
import matplotlib.pyplot as plt
import hyoga  # register colormaps, pylint: disable=unused-import

# initialize figure
fig, axes = plt.subplots(nrows=5)

# prepare gradient image
gradient = np.linspace(0, 1, 256)
gradient = np.vstack((gradient, gradient))

# plot background pattern and color gradients
colormaps = ['Bathymetric', 'Topographic', 'Elevational', 'Matte', 'Glossy']
for ax, name in zip(axes, colormaps):
    ax.patch.set(hatch='..', edgecolor='0.5')
    ax.imshow(gradient, aspect='auto', cmap=name)
    ax.text(-8, .5, name, va='center', ha='right', fontsize=10)
    ax.set(xticks=[], yticks=[])

# set title
axes[0].set_title('Hyoga colormaps')

# show

Total running time of the script: ( 0 minutes 0.141 seconds)

Gallery generated by Sphinx-Gallery