jroulet / cogwheel

Combining gravitational wave harmonics for efficient evaluation of likelihood
GNU General Public License v3.0
21 stars 11 forks source link

plot_whitened_wf() throws error if data_plot_kwargs includes color, linewidth, or label #6

Closed seth-olsen closed 1 year ago

seth-olsen commented 1 year ago

new implementation proposed:

        # Plot
        data_plot_kwargs = ({'c': 'C0', 'lw': .2, 'label': 'Data'}
                            | wf_plot_kwargs.pop('data_plot_kwargs', {}))
        for ax, data_det, wf_det in zip(axes, data_t_wht, wf_t_wht):
            if plot_data:
                ax.plot(time, data_det, **data_plot_kwargs)
            ax.plot(time, wf_det, **wf_plot_kwargs)