コード例 #1
0
ファイル: plot.py プロジェクト: spidersaint/sherpa
    def plot(self, overplot=False, clearwindow=True):
        xlo = self.xlo
        xhi = self.xhi
        y = self.y

        if self.mask is not None:
            xlo = self.xlo[self.mask]
            xhi = self.xhi[self.mask]
            y = self.y[self.mask]

        Histogram.plot(self, xlo, xhi, y, title=self.title,
                       xlabel=self.xlabel, ylabel=self.ylabel,
                       overplot=overplot, clearwindow=clearwindow)
コード例 #2
0
ファイル: plot.py プロジェクト: spidersaint/sherpa
    def plot(self, overplot=False, clearwindow=True):
        default_color = self.histo_prefs['linecolor']
        count = 0
        for xlo, xhi, y, color in izip(self.xlo, self.xhi, self.y, self.colors):
            if count != 0:
                overplot=True
                self.histo_prefs['linecolor']=color
            Histogram.plot(self, xlo, xhi, y, title=self.title,
                           xlabel=self.xlabel, ylabel=self.ylabel,
                           overplot=overplot, clearwindow=clearwindow)
            count += 1

        self.histo_prefs['linecolor'] = default_color
コード例 #3
0
    def plot(self, overplot=False, clearwindow=True, **kwargs):
        default_color = self.histo_prefs['linecolor']
        count = 0
        for xlo, xhi, y, color in \
                zip(self.xlo, self.xhi, self.y, self.colors):
            if count != 0:
                overplot = True
                self.histo_prefs['linecolor'] = color

            # Note: the user settings are sent to each plot
            Histogram.plot(self,
                           xlo,
                           xhi,
                           y,
                           title=self.title,
                           xlabel=self.xlabel,
                           ylabel=self.ylabel,
                           overplot=overplot,
                           clearwindow=clearwindow,
                           **kwargs)
            count += 1

        self.histo_prefs['linecolor'] = default_color