diff --git a/Fig3_PyGMT_backgrounds.ipynb b/Fig3_PyGMT_backgrounds.ipynb index d108b18..0b43ee7 100644 --- a/Fig3_PyGMT_backgrounds.ipynb +++ b/Fig3_PyGMT_backgrounds.ipynb @@ -38,7 +38,7 @@ " fig.basemap(region=region, projection=\"M?\", panel=2)\n", " fig.grdimage(grid=grd_relief, cmap=\"SCM/oleron\", shading=True)\n", " fig.colorbar(\n", - " frame=[\"xa500f250+lElevation\", \"y+lm\"],\n", + " annot=500, tick=250, label=\"Elvation\", unit=\"m\",\n", " position=Position(\"MR\", cstype=\"outside\"),\n", " shading=True,\n", " )\n", @@ -75,7 +75,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.7" + "version": "3.12.8" } }, "nbformat": 4, diff --git a/Fig4_PyGMT_pandas.ipynb b/Fig4_PyGMT_pandas.ipynb index 542a8fd..2c9c8af 100644 --- a/Fig4_PyGMT_pandas.ipynb +++ b/Fig4_PyGMT_pandas.ipynb @@ -45,7 +45,7 @@ " cmap=True,\n", " pen=\"gray10\",\n", ")\n", - "fig.colorbar(frame=[\"xaf+lHypocentral depth\", \"y+lkm\"])\n", + "fig.colorbar(annot=True, tick=True, label=\"Hypocentral depth\", unit=\"km\"])\n", "# Add legend for size-coding\n", "legend = io.StringIO(\n", " \"\\n\".join(f\"S 0.4 c {0.005 * 2**mag:.2f} - 1p 1 M {mag}\" for mag in [5, 6, 7])\n", @@ -90,7 +90,7 @@ ], "metadata": { "kernelspec": { - "display_name": "pygmt", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/Fig5_PyGMT_xarray.ipynb b/Fig5_PyGMT_xarray.ipynb index 6e94561..7afa015 100644 --- a/Fig5_PyGMT_xarray.ipynb +++ b/Fig5_PyGMT_xarray.ipynb @@ -21,7 +21,7 @@ "fig.shift_origin(xshift=\"w+0.5c\")\n", "fig.grdimage(mars_filter, shading=mars_grad, projection=\"G90/-20/12c\", frame=\"g30\")\n", "fig.colorbar(\n", - " frame=[\"xa2000f1000+lElevation\", \"y+lm\"],\n", + " annot=2000, tick=1000, label=\"Elevation\", unit=\"m\",\n", " position=Position(\"BC\", cstype=\"outside\", offset=(-6.25, 0.2)),\n", " bg_triangle=True,\n", " fg_triangle=True,\n", @@ -34,7 +34,7 @@ ], "metadata": { "kernelspec": { - "display_name": "pygmt", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/Fig6_PyGMT_geopandas.ipynb b/Fig6_PyGMT_geopandas.ipynb index 002cb60..107c08b 100644 --- a/Fig6_PyGMT_geopandas.ipynb +++ b/Fig6_PyGMT_geopandas.ipynb @@ -28,7 +28,7 @@ "pygmt.makecpt(cmap=\"SCM/hawaii\", series=[0, states[\"area\"].max()], reverse=True)\n", "fig.choropleth(states, pen=\"0.2p,gray50\", column=\"area\")\n", "fig.colorbar(\n", - " frame=\"xaf+lArea (1000 km@+2@+)\",\n", + " annot=True, tick=True, label=\"Area (1000 km@+2@+)\",\n", " position=Position(\"BR\", offset=(1.9, 0.2)),\n", " length=3,\n", " width=0.15,\n", @@ -68,7 +68,7 @@ ], "metadata": { "kernelspec": { - "display_name": "pygmt", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" },