Skip to content

Instantly share code, notes, and snippets.

@andyweizhao
Created January 3, 2019 13:27
Show Gist options
  • Save andyweizhao/8f13f0a2b5efde8739730acf98b4d9c9 to your computer and use it in GitHub Desktop.
Save andyweizhao/8f13f0a2b5efde8739730acf98b4d9c9 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
plt.style.use("classic")
case = 91
betas = distance_list[case]
alphas = connection_strengh_list[case]
for i in [0,2,3,4,6]:
_, ax = plt.subplots()
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.set_yticks([0,0.5,1])
if i in[2,4,6]:
c = 'brown'
alpha = 0.8
else:
c = 'red'
alpha = 0.4
plt.bar(range(len(alphas[i][:50])), alphas[i][:50], linewidth=0, edgecolor=c,width=1.0,
alpha=alpha, color=c, align='edge')
plt.ylim(0,1.1)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment