Skip to content

Instantly share code, notes, and snippets.

@yk-tanigawa
Last active June 15, 2016 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yk-tanigawa/60cf42bb3ed878c8ff384eeec82ead2d to your computer and use it in GitHub Desktop.
Save yk-tanigawa/60cf42bb3ed878c8ff384eeec82ead2d to your computer and use it in GitHub Desktop.
python plots snippet
def myheatmap(ndary):
X, Y = ndary.shape
fig = plt.figure(figsize=(8,8))
ax = fig.add_subplot(1,1,1)
ax.set_xlim(0, Y)
ax.set_ylim(0, X)
ax.invert_yaxis()
ax.pcolor(ndary, cmap=plt.cm.Blues)
fig.show()
def myhist(ary):
fig = plt.figure(figsize=(8,6))
ax = fig.add_subplot(1,1,1)
sns.distplot(ary, ax = ax, kde=False, rug=False)
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment