예제 #1
0
def main():
	counter = p36.main()
	freq = pd.Series(list(counter.values()), index=list(counter.keys()))

	plot = freq.hist()
	fig = plot.get_figure()
	fig.savefig('fig38.png')
예제 #2
0
def main():
	counter = p36.main()
	word10 = []
	count10 = []
	for word, count in counter.most_common(10):
		word10.append(word)
		count10.append(count)

	plt.bar(range(10), count10, align='center')
	plt.xticks(range(0, 10), word10)
	plt.savefig('fig37.png')
예제 #3
0
def main():
	counter = p36.main()
	#freq = pd.Series(list(counter.values()), index=list(counter.keys()))

	#plot = freq.hist()
	#fig = plot.get_figure()
	#fig.savefig('fig38.png')

	plt.figure()
	plt.xscale('log')
	plt.yscale('log')
	plt.plot(sorted(list(counter.values()), reverse=True), range(1, len(list(counter))+1))
	plt.savefig('fig39-2.png')
예제 #4
0
def main():
    counter = p36.main()
    #freq = pd.Series(list(counter.values()), index=list(counter.keys()))

    #plot = freq.hist()
    #fig = plot.get_figure()
    #fig.savefig('fig38.png')

    plt.figure()
    plt.xscale('log')
    plt.yscale('log')
    plt.plot(sorted(list(counter.values()), reverse=True),
             range(1,
                   len(list(counter)) + 1))
    plt.savefig('fig39-2.png')