Exemplo n.º 1
0
 def test_plot_profile(self):
     import matplotlib.pyplot as plt
     phase, prof, _ = fold_events(self.event_times,
                                  self.pulse_frequency)
     ax = plot_profile(phase, prof)
     plt.savefig('profile_direct.png')
     plt.close(plt.gcf())
Exemplo n.º 2
0
 def test_plot_profile_existing_ax(self):
     import matplotlib.pyplot as plt
     fig = plt.figure('Pulse profile')
     ax = plt.subplot()
     phase, prof, _ = fold_events(self.event_times,
                                  self.pulse_frequency, ax=ax)
     ax = plot_profile(phase, prof, ax=ax)
     plt.savefig('profile_existing_ax.png')
     plt.close(fig)
Exemplo n.º 3
0
    def test_plot_profile_errorbars(self):
        fig = plt.figure('Pulse profile')
        ax = plt.subplot()
        phase, prof, err = fold_events(self.event_times,
                                       self.pulse_frequency,
                                       ax=ax)

        ax = plot_profile(phase, prof, err=err, ax=ax)
        plt.savefig('profile_errorbars.png')
        plt.close(fig)