def create_x_pdf(self, where=None, color=None):
if where is None:
where = self.good
if color is None:
color = '#bbbbbb'
xmin, xmax = self.xlim
ymin, ymax = self.ylim
x = np.linspace(xmin, xmax, 100)
x_kde = stats.gaussian_kde(self.x[where])
x_pdf = x_kde(x)
x_pdf_n = x_pdf/np.nanmax(x_pdf)*(ymax - ymin)*self._FAC + ymin
"""
x_pdf = self.crossplot_ax.fill_between(x, x_pdf_n, ymin,
color=color, lw=0,
alpha=alpha, zorder=-1)
"""
x_pdf, = self.crossplot_ax.plot(x, x_pdf_n, color=color[:3],
alpha=color[-1], zorder=-1)
#"""
self.x_pdfs.append(x_pdf)
self.crossplot_ax.set_xlim(*self.xlim)
self.crossplot_ax.set_ylim(*self.ylim)
评论列表
文章目录