Skip to content

Commit 9375c02

Browse files
DOC/Gallery example "Plotting a surface": Migrate frame settings to the new Frame/Axis syntax; part 2 (#4504)
1 parent 3661b61 commit 9375c02

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/gallery/3d_plots/grdview_surface.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
The :meth:`pygmt.Figure.grdview()` method can plot 3-D surfaces with
66
``surftype="surface"``. Here, we supply the data as an :class:`xarray.DataArray` with
77
the coordinate vectors ``x`` and ``y`` defined. Note that the ``perspective`` parameter
8-
here controls the azimuth and elevation angle of the view. We provide a list of two
9-
arguments to ``frame`` - the first argument specifies the :math:`x`- and :math:`y`-axes
10-
frame attributes and the second argument, prepended with ``"z"``, specifies the
11-
:math:`z`-axis frame attributes. Specifying the same scale for the ``projection`` and
12-
``zscale`` parameters ensures equal axis scaling. The ``shading`` parameter specifies
13-
illumination; here we choose an azimuth of 45° with ``shading="+a45"``.
8+
here controls the azimuth and elevation angle of the view. Specifying the same scale
9+
for the ``projection`` and ``zscale`` parameters ensures equal axis scaling. The
10+
``shading`` parameter specifies illumination; here we choose an azimuth of 45° with
11+
``shading="+a45"``.
1412
"""
1513

1614
# %%
@@ -48,7 +46,7 @@ def ackley(x, y):
4846
data,
4947
# Set annotations and gridlines in steps of five, and tick marks in steps of one
5048
frame=Frame(
51-
axis=Axis(annot=5, tick=1, grid=5),
49+
axis=Axis(annot=5, tick=1, grid=5), # x and y axes
5250
zaxis=Axis(annot=5, tick=1, grid=5),
5351
),
5452
projection=f"x{SCALE}c",

0 commit comments

Comments
 (0)