From f8bdc7d566fe0557a0cf433e5910942afa80e2b1 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 28 Feb 2026 12:55:35 +0800 Subject: [PATCH 1/2] DOC: Use the EU flag image from the GMT data server in the 'Draping on 3-D surface' example --- examples/tutorials/advanced/draping_on_3d_surface.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/tutorials/advanced/draping_on_3d_surface.py b/examples/tutorials/advanced/draping_on_3d_surface.py index 4b59156978a..189e59cf70d 100644 --- a/examples/tutorials/advanced/draping_on_3d_surface.py +++ b/examples/tutorials/advanced/draping_on_3d_surface.py @@ -96,9 +96,11 @@ # Determine the 3-D region from the minimum and maximum values of the relief grid region_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()] -# Download an PNG image of the flag of the EU using rasterio and load it into a -# xarray.DataArray -url_to_image = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flag_of_Europe.svg/1024px-Flag_of_Europe.svg.png" +# Load a PNG image of the EU flag using rasterio into an xarray.DataArray. +# The original image is available on Wikimedia Commons at +# https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flag_of_Europe.svg/1024px-Flag_of_Europe.svg.png +# but we use a cached version on the GMT data server. +url_to_image = "https://oceania.generic-mapping-tools.org/cache/euflag.png" with rasterio.open(url_to_image) as dataset: data = dataset.read() drape_grid = xr.DataArray(data, dims=("band", "y", "x")) From bec77e0aeca4bdb225e293c65293ada32816c3d5 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 28 Feb 2026 13:11:24 +0800 Subject: [PATCH 2/2] Minor change to trigger RTD build again --- examples/tutorials/advanced/draping_on_3d_surface.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/tutorials/advanced/draping_on_3d_surface.py b/examples/tutorials/advanced/draping_on_3d_surface.py index 189e59cf70d..f0c83765638 100644 --- a/examples/tutorials/advanced/draping_on_3d_surface.py +++ b/examples/tutorials/advanced/draping_on_3d_surface.py @@ -8,7 +8,6 @@ This tutorial consists of two examples: 1. Draping a grid - 2. Draping an image """ @@ -53,7 +52,7 @@ pygmt.makecpt(cmap="SCM/batlow", series=[0, 200, 1], reverse=True, overrule_bg=True) fig.grdview( - projection="M12c", # Mercator projection with a width of 12 centimeters + projection="M12c", # Mercator projection with a width of 12 cm region=region_3d, grid=grd_relief, # Use elevation grid for z values drape_grid=grd_age, # Use crustal age grid for color-coding @@ -119,7 +118,7 @@ pygmt.makecpt(cmap="0/51/153,255/204/0", series=[0, 256, 128]) fig.grdview( - projection="M12c", # Mercator projection with a width of 12 centimeters + projection="M12c", # Mercator projection with a width of 12 cm region=region_3d, grid=grd_relief, # Use elevation grid for z values drape_grid=drape_grid, # Drape image grid for the EU flag on top @@ -128,7 +127,7 @@ # Use an illumination from the azimuthal directions 0° (north) and 270° (west) with # a normalization via a cumulative Laplace distribution for the shading shading="+a0/270+ne0.6", - perspective=[157.5, 30], # Define azimuth, elevation for the 3-D plot + perspective=(157.5, 30), # Define azimuth, elevation for the 3-D plot zsize="1c", facade_fill="darkgray", frame=True,