diff --git a/examples/tutorials/analysis-time/Time_resolved_spectroscopy.py b/examples/tutorials/analysis-time/Time_resolved_spectroscopy.py index 32359b2958..d0c6301335 100644 --- a/examples/tutorials/analysis-time/Time_resolved_spectroscopy.py +++ b/examples/tutorials/analysis-time/Time_resolved_spectroscopy.py @@ -1,10 +1,7 @@ """ -A time resolved spectroscopy estimator +Time resolved spectroscopy estimator ====================================== -Aim ---- - Perform spectral fits of a blazar in different time bins to investigate spectral changes during flares. @@ -257,7 +254,6 @@ def time_resolved_spectroscopy(datasets, model, time_intervals): def create_table(time_intervals, fit_result): - t = QTable() t["tstart"] = np.array(time_intervals).T[0] @@ -325,11 +321,18 @@ def create_table(time_intervals, fit_result): # amplitude # +plt.errorbar( + table["amplitude"], + table["index"], + xerr=table["amplitude_err"], + yerr=table["index_err"], + linestyle=":", + linewidth=0.5, +) plt.scatter(table["amplitude"], table["index"], c=time_axis.center.value) -plt.plot(table["amplitude"], table["index"], linewidth=0.5) plt.xlabel("amplitude") plt.ylabel("index") -plt.colorbar() +plt.colorbar().set_label("time") plt.show()