-
Notifications
You must be signed in to change notification settings - Fork 1
Figure 3: Backgroundmaps - coast, remote dataset, tilemap, 3-D - relief of Iceland #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 44 commits
c893251
2b5b27b
c7325ea
d403d9d
e5a95f5
abef33c
12f4857
0657fdc
31c6b38
354c468
f57032a
4468e4b
9e0d96e
d3fa667
f4d2666
5fbe7c6
a3a84c8
fc16d69
2c6c174
4c992a5
b134bc6
eac7ddb
fc0795b
69a81f7
c5dae58
c506096
e03ecbd
68a3e20
a6b1761
0280660
daf58db
5c9f612
64d12ac
1a2145c
c5b1594
aad078a
32fc8dc
27fabd0
4729a15
3846e42
d89bde4
4b9b4bc
6266d14
c3d1272
07bf2ec
ca8efe4
82d472e
600fb8b
25157e1
bd66675
4c38d3d
a3138b8
6b2d62c
60f1218
f90603d
6d2200a
ba6ba57
ac9ad36
c6034bf
3a175ef
aa6d0bb
e3ef58a
b74e843
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
seisman marked this conversation as resolved.
Show resolved
Hide resolved
seisman marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": 1, | ||
| "id": "d57cb626-f006-4a23-950d-c673fd04b840", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "# Copy finale version of script from normal Python file" | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": "Python 3 (ipykernel)", | ||
| "language": "python", | ||
| "name": "python3" | ||
| }, | ||
| "language_info": { | ||
| "codemirror_mode": { | ||
| "name": "ipython", | ||
| "version": 3 | ||
| }, | ||
| "file_extension": ".py", | ||
| "mimetype": "text/x-python", | ||
| "name": "python", | ||
| "nbconvert_exporter": "python", | ||
| "pygments_lexer": "ipython3", | ||
| "version": "3.12.3" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 5 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import pygmt | ||
|
|
||
| region = [-25, -13, 63.2, 66.7] | ||
|
|
||
| fig = pygmt.Figure() | ||
| with fig.subplot( | ||
| nrows=2, | ||
| ncols=2, | ||
| subsize=("12c", "8.5c"), | ||
| autolabel="(a)+o0.15c/0.3c+gwhite@30+v", # vertical order of labels | ||
yvonnefroehlich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| margins=("0.3c", "0.2c"), | ||
| sharex="b", | ||
| sharey="l", | ||
| frame="WSrt", | ||
yvonnefroehlich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
yvonnefroehlich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ): | ||
|
|
||
yvonnefroehlich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # Top left | ||
| fig.basemap(region=region, projection="M?", panel=0) | ||
| fig.coast(land="gray", water="lightblue", shorelines=True, resolution="high") | ||
| fig.basemap(map_scale="n0.86/0.1+c+w100k+f+l") | ||
|
|
||
| # Bottom left | ||
| fig.tilemap(region=region, projection="M?", zoom=7, panel=1) | ||
|
|
||
| # Top right | ||
| grd_relief = pygmt.datasets.load_earth_relief(resolution="01m", region=region) | ||
| fig.basemap(region=region, projection="M?", panel=2) | ||
| fig.grdimage(grid=grd_relief, cmap="SCM/oleron", shading=True) | ||
| fig.colorbar(frame=["x+lElevation", "y+lm"], position="JRM", shading=True) | ||
yvonnefroehlich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Bottom right | ||
| fig.basemap(region=region, projection="M?", perspective=(-150, 25), panel=3) | ||
|
||
| fig.grdview( | ||
| grid=grd_relief, | ||
| cmap="SCM/oleron", | ||
| surftype="s", | ||
| shading=True, | ||
| zsize="1.5c", | ||
| plane="+ggrey", | ||
yvonnefroehlich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| perspective=True, | ||
| ) | ||
|
|
||
yvonnefroehlich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fig.show() | ||
| fig.savefig("Fig3_PyGMT_backgrounds.png") | ||
Uh oh!
There was an error while loading. Please reload this page.