Skip to content

Instantly share code, notes, and snippets.

View jaradc's full-sized avatar

jaradc

View GitHub Profile
@jaradc
jaradc / random_colormap.py
Last active November 30, 2017 05:56 — forked from jgomezdans/random.py
Random colormap for matplotlib
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
# A random colormap for matplotlib
rand_cmap = ListedColormap(np.random.rand(256,3))
for i in range(5):
plt.scatter([1,2,3], np.random.randn(3), s=10, cmap=rand_cmap)