Skip to content

Commit

Permalink
initialisation maps example rerun to ensure it works with the variabl…
Browse files Browse the repository at this point in the history
…e name changes, also cleaned up the final plotting code
  • Loading branch information
michaeldenes committed May 29, 2024
1 parent 62f39db commit 7ab2bdf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/examples/example_initialisation_maps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_42384/2574947031.py:1: DtypeWarning: Columns (1,2,3,4) have mixed types. Specify dtype option on import or set low_memory=False.\n",
"/tmp/ipykernel_498482/2574947031.py:1: DtypeWarning: Columns (1,2,3,4) have mixed types. Specify dtype option on import or set low_memory=False.\n",
" concentrations_ds = pd.read_csv(settings['release_maps']['global_concentrations'])\n"
]
}
Expand Down Expand Up @@ -1669,7 +1669,7 @@
"# Plot the coastal initialisation map\n",
"ax = plt.subplot(gs[0,0], projection=ccrs.Robinson())\n",
"vmin, vmax = 1e-1, 1e3\n",
"cb = ax.scatter(pset_coastal.lon, pset_coastal.lat, c=pset_coastal.plastic_amount, s=0.25, cmap=plt.cm.inferno, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
"cb = ax.scatter(pset_coastal.lon, pset_coastal.lat, c=pset_coastal.plastic_amount, s=0.25, cmap=plt.cm.inferno, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
"ax.set_global()\n",
"cbar_ax = ax.inset_axes(cb_axes_position)\n",
Expand All @@ -1680,7 +1680,7 @@
"# Plot the rivers initialisation map\n",
"ax = plt.subplot(gs[0,2], projection=ccrs.Robinson())\n",
"vmin, vmax = 1e-1, 1e2\n",
"cb = ax.scatter(pset_rivers.lon, pset_rivers.lat, c=pset_rivers.plastic_amount, s=0.25, cmap=cmocean.cm.solar, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
"cb = ax.scatter(pset_rivers.lon, pset_rivers.lat, c=pset_rivers.plastic_amount, s=0.25, cmap=cmocean.cm.solar, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
"ax.set_global()\n",
"cbar_ax = ax.inset_axes(cb_axes_position)\n",
Expand All @@ -1691,7 +1691,7 @@
"# Plot the fisheries initialisation map\n",
"ax = plt.subplot(gs[1,0], projection=ccrs.Robinson())\n",
"vmin, vmax = 1e-1, 1e3\n",
"cb = ax.scatter(pset_fisheries.lon, pset_fisheries.lat, c=pset_fisheries.plastic_amount, s=0.1, cmap=plt.cm.Spectral_r, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
"cb = ax.scatter(pset_fisheries.lon, pset_fisheries.lat, c=pset_fisheries.plastic_amount, s=0.1, cmap=plt.cm.Spectral_r, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
"ax.set_global()\n",
"cbar_ax = ax.inset_axes(cb_axes_position)\n",
Expand All @@ -1701,10 +1701,10 @@
"\n",
"# Plot the current concentrations initialisation map\n",
"ax = plt.subplot(gs[1,2], projection=ccrs.Robinson())\n",
"vmin, vmax = 1e-1, 200\n",
"vmin2, vmax2 = 1e-6, 0.05\n",
"cb1 = ax.scatter(pset_conc_ocean.lon, pset_conc_ocean.lat, c=pset_conc_ocean.plastic_amount, s=0.25, cmap=plt.cm.viridis, transform=ccrs.PlateCarree(), vmin=vmin2, vmax =vmax2, norm=matplotlib.colors.LogNorm())\n",
"cb2 = ax.scatter(pset_conc_beach.lon, pset_conc_beach.lat, c=pset_conc_beach.plastic_amount, s=0.25, cmap=plt.cm.magma, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
"vmin, vmax = 1e-6, 0.05\n",
"vmin2, vmax2 = 1e-1, 200\n",
"cb1 = ax.scatter(pset_conc_ocean.lon, pset_conc_ocean.lat, c=pset_conc_ocean.plastic_amount, s=0.25, cmap=plt.cm.viridis, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
"cb2 = ax.scatter(pset_conc_beach.lon, pset_conc_beach.lat, c=pset_conc_beach.plastic_amount, s=0.25, cmap=plt.cm.magma, transform=ccrs.PlateCarree(), vmin=vmin2, vmax=vmax2, norm=matplotlib.colors.LogNorm())\n",
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
"ax.set_global()\n",
"cbar_ax1 = ax.inset_axes(cb_axes_position)\n",
Expand Down

0 comments on commit 7ab2bdf

Please sign in to comment.