docs: def plot_observed_recurrence(
          catalogue, completeness, dmag, end_year=None, filename=None,
          figure_size=(8, 6), filetype='png', dpi=300, ax=None):
      """
      Plots the observed recurrence taking into account the completeness
      """
      # Get completeness adjusted recurrence table
      if isinstance(completeness, float):
          # Unique completeness
          completeness = np.array([[np.min(catalogue.data['year']),
                                    completeness]])
      if not end_year:
          end_year = catalogue.update_end_year()
      catalogue.data["dtime"] = catalogue.get_decimal_time()
      cent_mag, t_per, n_obs = get_completeness_counts(catalogue,
                                                       completeness,
                                                       dmag)
      obs_rates = n_obs / t_per
      cum_obs_rates = np.array([np.sum(obs_rates[i:])
                                for i in range(len(obs_rates))])
  
      if ax is None:
          fig, ax = plt.subplots(figsize=figure_size)
      else:
          fig = ax.get_figure()
  
      ax.semilogy(cent_mag, obs_rates, 'bo', label="Incremental")
      ax.semilogy(cent_mag, cum_obs_rates, 'rs', label="Cumulative")
      ax.set_xlim([cent_mag[0] - 0.1, cent_mag[-1] + 0.1])
      ax.set_xlabel('Magnitude')
      ax.set_ylabel('Annual Rate')
      ax.legend()
      _save_image(fig, filename, filetype, dpi)