# WARNING: computing the KDE will take a few minutesfig,axes=plt.subplots(nrows=1,ncols=5,figsize=(15,5))line_props={"pretraining":dict(linestyle="-"),"Script":dict(linestyle=(0,(1,1))),"Human":dict(linestyle=(0,(1,1))),}forax,appinzip(axes,TARGETS_LABEL):forpartition_namein["pretraining","Script","Human",]:props=line_props[partition_name]sns.kdeplot(ax=ax,data=all_pkts_size[partition_name][app],linewidth=2,label=partition_name,**props,fill=True,alpha=0.1)ax.legend(bbox_to_anchor=(0.5,1.5),loc="upper center")ax.set_title(app,fontsize=10)ax.set_xlim((-500,1800))ax.set_xlabel("packet size")ax.set_ylabel("kde")plt.tight_layout()plt.savefig("ucdavid-icdm19_kde_pkts_size.png",dpi=300,bbox_inches='tight')