def line_plot(data ,title = "", x_title ="", y_title="", legend_label="",group_labels=None):
plot_data = DataFrame()
plot_data['x'] = data[:, 1].astype(int)
plot_data['y'] = data[:, 0].astype(float)
plot_data[legend_label] = data[:, 2]
sns.set(style="whitegrid")
g = sns.pointplot(x="x", y="y", hue=legend_label, data=plot_data, hue_order=np.unique(plot_data[legend_label]))
plt.title(title, fontsize=25)
plt.ylabel(y_title, fontsize=12)
plt.xlabel(x_title, fontsize=12)
plt.show()
cyber_attack_classification.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录