Skip to content

Commit

Permalink
Merge pull request gammapy#5593 from meeseeksmachine/auto-backport-of…
Browse files Browse the repository at this point in the history
…-pr-5584-on-v1.3.x

Backport PR gammapy#5584 on branch v1.3.x (Fix y-label in Low level API tutorials)
  • Loading branch information
registerrier authored Nov 22, 2024
2 parents 29b111c + 2e9d78d commit be735aa
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 be735aa

Please sign in to comment.