Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Fig1_PyGMT_GMT_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@
"outputs": [],
"source": [
"import pygmt\n",
"from pygmt.params import Frame\n",
"\n",
"fig = pygmt.Figure()\n",
"pygmt.config(FONT_TITLE=\"10p\", MAP_TITLE_OFFSET=\"4p\")\n",
"fig.basemap(region=[0, 20, 0, 3], projection=\"X7.5c/2c\", frame=\"lrtb+tGMT CLI\")\n",
"fig.basemap(region=[0, 20, 0, 3], projection=\"X7.5c/2c\", frame=Frame(\"lrtb\", title=\"GMT CLI\"))\n",
"fig.paragraph(\n",
" x=0.25,\n",
" y=0.6,\n",
Expand All @@ -96,7 +97,7 @@
")\n",
"\n",
"fig.shift_origin(xshift=\"w+0.1c\")\n",
"fig.basemap(region=[0, 20, 0, 3], projection=\"X9.25c/2c\", frame=\"lrtb+tPyGMT\")\n",
"fig.basemap(region=[0, 20, 0, 3], projection=\"X9.25c/2c\", frame=Frame(\"lrtb\", title=\"PyGMT\"))\n",
"fig.paragraph(\n",
" x=0.25,\n",
" y=0.25,\n",
Expand Down Expand Up @@ -128,7 +129,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down
6 changes: 5 additions & 1 deletion Fig4_PyGMT_pandas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@
" fig.histogram(\n",
" region=[4.8, 9.2, 0, 0],\n",
" projection=\"X?/?\",\n",
" frame=[\"WSrt\", \"xa1f0.2+lMagnitude\", \"yaf+lCounts\"],\n",
" frame=Frame(\n",
" axes=\"WSrt\", \n",
" xaxis=Axis(annot=1, tick=0.2, label=\"Magnitude\"), \n",
" yaxis=Axis(annot=True, tick=True, label=\"Counts\"),\n",
" ),\n",
" data=df_eqs.mag,\n",
" series=0.2,\n",
" fill=\"darkgray\",\n",
Expand Down
6 changes: 3 additions & 3 deletions Fig5_PyGMT_xarray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"outputs": [],
"source": [
"import pygmt\n",
"from pygmt.params import Position\n",
"from pygmt.params import Axis, Position\n",
"\n",
"mars = pygmt.datasets.load_mars_relief(resolution=\"10m\")\n",
"with pygmt.config(PROJ_ELLIPSOID=\"mars\"):\n",
Expand All @@ -17,9 +17,9 @@
"\n",
"fig = pygmt.Figure()\n",
"pygmt.makecpt(cmap=\"SCM/batlow\", series=[-6500, 6500])\n",
"fig.grdimage(mars_filter, shading=mars_grad, projection=\"G-90/20/12c\", frame=\"g30\")\n",
"fig.grdimage(mars_filter, shading=mars_grad, projection=\"G-90/20/12c\", frame=Axis(grid=30))\n",
"fig.shift_origin(xshift=\"w+0.5c\")\n",
"fig.grdimage(mars_filter, shading=mars_grad, projection=\"G90/-20/12c\", frame=\"g30\")\n",
"fig.grdimage(mars_filter, shading=mars_grad, projection=\"G90/-20/12c\", frame=Axis(grid=30))\n",
"fig.colorbar(\n",
" frame=[\"xa2000f1000+lElevation\", \"y+lm\"],\n",
" position=Position(\"BC\", cstype=\"outside\", offset=(-6.25, 0.2)),\n",
Expand Down
6 changes: 3 additions & 3 deletions Fig7_PyGMT_datetime.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"\n",
"import pandas as pd\n",
"import pygmt\n",
"from pygmt.params import Box, Position\n",
"from pygmt.params import Axis, Box, Frame, Position\n",
"\n",
"fig = pygmt.Figure()\n",
"fig.basemap(\n",
" projection=\"X12c/6c\",\n",
" region=[datetime.date(2016, 1, 1), datetime.datetime.now(), -50, 1000],\n",
" frame=[\"x\", \"ya100f50+lGitHub stars\"],\n",
" frame=Frame(xaxis=True, yaxis=Axis(annot=200, tick=50, label=\"GitHub stars\")),\n",
")\n",
"\n",
"for wrapper, file, color, symbol in zip(\n",
Expand Down Expand Up @@ -105,7 +105,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down