def display(self, output_filename):
fig, (self.ax) = plt.subplots(1, 1)
self.kde = KernelDensity(kernel = 'gaussian', bandwidth = self.bandwidth)
for i in range(len(self.datasets)):
self.displayDataset(self.datasets[i])
if self.title is not None:
self.ax.set_xlabel(self.title)
self.ax.set_ylabel('Density')
self.ax.legend(bbox_to_anchor = (0., 1.02, 1., .102), loc = 3,
ncol = 3, mode = 'expand', borderaxespad = 0.)
fig.savefig(output_filename)
plt.close(fig)
评论列表
文章目录