How to use the fitlins.viz.plot_and_save function in fitlins

To help you get started, we’ve selected a few fitlins examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github poldracklab / fitlins / fitlins / interfaces / visualizations.py View on Github external
def _visualize(self, data, out_name):
        contrast_matrix = pd.DataFrame({c['name']: c['weights'][0]
                                        for c in self.inputs.contrast_info})
        all_cols = list(data.columns)
        evs = set(contrast_matrix.index)
        if set(contrast_matrix.index) != all_cols[:len(evs)]:
            ev_cols = [col for col in all_cols if col in evs]
            confound_cols = [col for col in all_cols if col not in evs]
            data = data[ev_cols + confound_cols]
        plot_and_save(out_name, plot_corr_matrix,
                      data.drop(columns='constant').corr(),
                      len(evs))
github poldracklab / fitlins / fitlins / interfaces / visualizations.py View on Github external
def _visualize(self, data, out_name):
        from matplotlib import pyplot as plt
        plt.set_cmap('viridis')
        plot_and_save(out_name, nis.reporting.plot_design_matrix, data)