<jupyter_start><jupyter_text>Code to create the texture colormap.png<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
def plot_cmap(colormaps, pts, dpi=72,):
    ny, nx = pts.shape
    ny *= len(colormaps)

    ## create a square image that has a precise number of pixels
    ##  a row for each colormap
    f, ax = plt.subplots(len(colormaps),1, figsize=(nx/dpi, ny/dpi), dpi=dpi)
    plt.subplots_adjust(wspace=0, hspace=0, bottom=0, top=1, left=0, right=1)

    ## plot a color gradient in each axis
    for i,c in enumerate(colormaps):
        ax[i].imshow(pts, aspect='equal', cmap=c)
        ax[i].axis('off')

gradient = np.linspace(0, 1, 256)
colormapsList= ['viridis', 'plasma', 'inferno', 'magma',
        'Greys', 'Purples', 'Blues', 'Greens', 'Oranges',
        'binary', 'gist_yarg', 'gist_gray', 'gray', 'afmhot',
        'PiYG', 'PRGn', 'BrBG', 'RdGy', 'coolwarm', 'bwr',
        'Pastel1', 'Pastel2', 'Paired', 'Accent', 'Dark2', 'Set1',
        'flag', 'prism', 'ocean', 'gist_earth', 'terrain', 'gist_stern']


## thickness of each row in pixels
ny = 8

## create a grid of gradient points
pts = np.zeros((ny,gradient.size))
pts[:,] = gradient

## make image
plot_cmap(colormapsList[::-1], pts) #reversed order for consistency with Mahlet's version


plt.savefig("colormap.png", bbox_inches='tight',pad_inches=0)
plt.show()

## write colormap names out
with open("colormap_names.json",'w') as handle:
    handle.write('{"names":%s'%str(colormapsList).replace("'",'"')+'}')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17424727738629084, 'fraction_numerical': 0.013452914798206279, 'mean_word_length': 4.519434628975265, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '47232', 'license': 'MIT', 'n_tokens_mistral': 625, 'n_tokens_neox': 599, 'n_words': 147, 'path': 'src/Firefly/static/textures/createColormap.ipynb', 'repo_name': 'neutrinoceros/Firefly', 'size': '1561'}