16 lines
317 B
Python
16 lines
317 B
Python
"""
|
|
绘制cluster大小分布图
|
|
"""
|
|
from matplotlib import pyplot as plt
|
|
import numpy as np
|
|
|
|
|
|
|
|
data = np.load('outputs/cluster.npy')
|
|
fig = plt.figure(figsize=(4,3))
|
|
ax = fig.gca()
|
|
plt.bar(np.arange(len(data))+1, data)
|
|
ax.set_xlabel("Cluster Size")
|
|
ax.set_ylabel("Portion of Population")
|
|
plt.tight_layout()
|
|
plt.show() |