def plot_rpha(self, filename, pmin=None, pmax=None, title=None):
        """plot all resistance/resistivity phase spectra
        """
        cmap = mpl.cm.get_cmap('viridis')
        SM = mpl.cm.ScalarMappable(norm=None, cmap=cmap)
        colors = SM.to_rgba(np.linspace(0, 1, len(self.objects)))
        fig, ax = plt.subplots(1, 1, figsize=(15 / 2.54, 15 / 2.54))
        for nr, item in enumerate(self.objects):
            ax.semilogx(
                item.frequencies,
                -item.rpha,
                '.-',
                color=colors[nr],
                label=self.labels[nr],
            )
        ax.set_xlim(*self.xlim)
        ax.set_ylabel(sip_labels.get_label('rpha', 'meas', 'mathml'))
        ax.set_xlabel('frequency [Hz]')
        ax.set_ylim(pmin, pmax)
        if title is not None:
            ax.set_title(title)
        self._add_legend(ax)
        fig.tight_layout()
        fig.subplots_adjust(bottom=0.5)
        fig.savefig(filename, dpi=300)
        plt.close(fig)
def plot_rpha ( self , filename , pmin = None , pmax = None , title = None ) : cmap = mpl . cm . get_cmap ( 'viridis' ) SM = mpl . cm . ScalarMappable ( norm = None , cmap = cmap ) colors = SM . to_rgba ( np . linspace ( 0 , 1 , len ( self . objects ) ) ) fig , ax = plt . subplots ( 1 , 1 , figsize = ( 15 / 2.54 , 15 / 2.54 ) ) for nr , item in enumerate ( self . objects ) : ax . semilogx ( item . frequencies , - item . rpha , '.-' , color = colors [ nr ] , label = self . labels [ nr ] , ) ax . set_xlim ( * self . xlim ) ax . set_ylabel ( sip_labels . get_label ( 'rpha' , 'meas' , 'mathml' ) ) ax . set_xlabel ( 'frequency [Hz]' ) ax . set_ylim ( pmin , pmax ) if title is not None : ax . set_title ( title ) self . _add_legend ( ax ) fig . tight_layout ( ) fig . subplots_adjust ( bottom = 0.5 ) fig . savefig ( filename , dpi = 300 ) plt . close ( fig )
plot all resistance/resistivity phase spectra