Created
June 6, 2013 08:40
-
-
Save hiccupzhu/5720168 to your computer and use it in GitHub Desktop.
load config-file draw graphs.
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
import matplotlib | |
import matplotlib.pyplot as plt | |
Y = [] | |
matplotlib.rcParams["savefig.dpi"]=80; | |
print matplotlib.rcParams["savefig.dpi"] | |
file = open("./statistic.txt", "r"); | |
lines = file.readlines(); | |
file.close(); | |
for line in lines: | |
Y += line.split(); | |
X = range(0, 256); | |
print "X=", len(X) | |
print "Y=", len(Y) | |
fig = plt.figure(figsize=(8,4)) | |
ax = fig.add_subplot(111) | |
plt.xlim(0, 256) | |
ax.plot(X, Y) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment