Skip to content

Instantly share code, notes, and snippets.

@tsherwen
tsherwen / bivariate.py
Created February 7, 2020 00:32 — forked from wolfiex/bivariate.py
Bivariate colourplot edit
import numpy as np
import matplotlib.pyplot as plt
def colorFromBivariateData(Z1,Z2,cmap1 = plt.cm.Blues, cmap2 = plt.cm.Reds, preset = False):
if preset:
z1mn = 0.
z2mn = 0.
z1mx = 1.
z2mx = 1.
@tsherwen
tsherwen / CBcolors.py
Created February 17, 2018 11:59 — forked from thriveth/CBcolors.py
A color blind/friendly color cycle for Matplotlib line plots. Might want to shuffle it around a bit more,but already not it gives kinda good contrasts between subsequent colors, and shows reasonably well in colorblind filters (though not in pure monochrome).
CB_color_cycle = ['#377eb8', '#ff7f00', '#4daf4a',
'#f781bf', '#a65628', '#984ea3',
'#999999', '#e41a1c', '#dede00']