Skip to content

Instantly share code, notes, and snippets.

View pmarshwx's full-sized avatar

Patrick Marsh pmarshwx

View GitHub Profile
@pmarshwx
pmarshwx / axes_grid1_cbar_bug.py
Created July 16, 2011 16:43
Demonstrates bug in the tick-labels of a colorbar in axes_grid1 ImageGrid
import numpy as np
from matplotlib.pyplot import figure, scatter, colorbar
from matplotlib.colors import ListedColormap, BoundaryNorm
def get_colors():
values = [0., 0.01, 0.1, 0.25, 0.5, 0.75, 1., 1.25, 1.5, 1.75, 2., 2.5, 3.,
4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15.]
colors = ["#FFFFFF", "#7FFF00", "#00CD00", "#008B00", "#104E8B", "#1E90FF",
"#00B2EE", "#00EEEE", "#8968CD", "#912CEE", "#8B008B", "#8B0000",