Last active
June 15, 2016 07:25
-
-
Save yk-tanigawa/60cf42bb3ed878c8ff384eeec82ead2d to your computer and use it in GitHub Desktop.
python plots snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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