Skip to content

Commit

Permalink
Backport PR gammapy#5584: Fix y-label in Low level API tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
registerrier authored and meeseeksmachine committed Nov 21, 2024
1 parent 29b111c commit 2e9d78d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/tutorials/starting/analysis_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,10 @@
#

energy_bounds = [1, 10] * u.TeV
spec.plot(energy_bounds=energy_bounds, energy_power=2)
ax = spec.plot_error(energy_bounds=energy_bounds, energy_power=2)

fig, ax = plt.subplots(figsize=(8, 6))
spec.plot(ax=ax, energy_bounds=energy_bounds, sed_type="e2dnde")
spec.plot_error(ax=ax, energy_bounds=energy_bounds, sed_type="e2dnde")
plt.show()


Expand All @@ -417,6 +419,8 @@
# %%time
flux_points = fpe.run(datasets=[stacked])

ax = spec.plot_error(energy_bounds=energy_bounds, energy_power=2)
flux_points.plot(ax=ax, energy_power=2)
fig, ax = plt.subplots(figsize=(8, 6))
spec.plot(ax=ax, energy_bounds=energy_bounds, sed_type="e2dnde")
spec.plot_error(ax=ax, energy_bounds=energy_bounds, sed_type="e2dnde")
flux_points.plot(ax=ax, sed_type="e2dnde")
plt.show()

0 comments on commit 2e9d78d

Please sign in to comment.