Fix sed tutorial
"outputs": [],
"source": [
"ax = plt.subplot()\n",
+ "ax.yaxis.set_units(u.Unit(\"TeV cm-2 s-1\"))\n",
"\n",
"kwargs = {\"ax\": ax, \"sed_type\": \"e2dnde\"}\n",
"\n",
"for d in datasets:\n",
" d.data.plot(label=d.name, **kwargs)\n",
"\n",
- "ax.yaxis.set_units(u.Unit(\"TeV cm-2 s-1\"))\n",
"energy_bounds = [1e-4, 1e2] * u.TeV\n",
"pwl.plot(energy_bounds=energy_bounds, color=\"k\", **kwargs)\n",
"pwl.plot_error(energy_bounds=energy_bounds, **kwargs)\n",
"source": [
"ax = plt.subplot()\n",
"\n",
- "kwargs = {\"ax\": ax, \"sed_type\": \"e2dnde\", \"yunits\": u.Unit(\"TeV cm-2 s-1\")}\n",
+ "kwargs = {\"ax\": ax, \"sed_type\": \"e2dnde\"}\n",
+ "\n",
+ "ax.yaxis.set_units(u.Unit(\"TeV cm-2 s-1\"))\n",
"\n",
"for d in datasets:\n",
" d.data.plot(label=d.name, **kwargs)\n",
"source": [
"ax = plt.subplot()\n",
"\n",
- "kwargs = {\"ax\": ax, \"sed_type\": \"e2dnde\", \"yunits\": u.Unit(\"TeV cm-2 s-1\")}\n",
+ "kwargs = {\"ax\": ax, \"sed_type\": \"e2dnde\"}\n",
+ "\n",
+ "ax.yaxis.set_units(u.Unit(\"TeV cm-2 s-1\"))\n",
"\n",
"for d in datasets:\n",
" d.data.plot(label=d.name, **kwargs)\n",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.0"
+ "version": "3.9.12"
}
},
"nbformat": 4,
