Skip to content

Commit d846477

Browse files
committed
Merge branch 'main' into refactor/colorbar
2 parents 39eea70 + b4a94d7 commit d846477

35 files changed

+537
-189
lines changed

doc/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ Class-style Parameters
214214

215215
Box
216216
Pattern
217+
Position
217218

218219
Enums
219220
-----

examples/gallery/embellishments/solar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
terminator_datetime=reference_time,
3333
# Set the fill for the night area to navy blue with 85 % transparency
3434
fill="navyblue@85",
35-
pen="0.5p", # Set the outline to be 0.5 points thick
35+
pen="0.5p", # Set the outline to be 0.5-point thick
3636
)
3737

3838
fig.show()

examples/gallery/images/cross_section.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# directions, respectively; move the x-label above the horizontal colorbar ("+ml")
4747
position="jBR+o0.7c/0.8c+h+w5c/0.3c+ml",
4848
# Add a box around the colobar, filled in white and a 30 % transparency, with a
49-
# 0.8-points thick, black, outline.
49+
# 0.8-point thick, black, outline.
5050
box=Box(pen="0.8p,black", fill="white@30"),
5151
# Add x- and y-labels ("+l")
5252
frame=["x+lElevation", "y+lm"],
@@ -103,7 +103,7 @@
103103
x=[0, 15],
104104
y=[0, 0],
105105
fill="lightblue", # Fill the polygon in "lightblue"
106-
pen="0.25p,black,solid", # Draw a 0.25-points thick, black, solid outline
106+
pen="0.25p,black,solid", # Draw a 0.25-point thick, black, solid outline
107107
close="+y-8000", # Force closed polygon
108108
)
109109

examples/gallery/images/grdlandmask.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
==========================
44
55
The :func:`pygmt.grdlandmask` function allows setting all nodes on land
6-
or water to a specified value using the ``maskvalues`` parameter.
6+
or water to a specified value using the ``mask_values`` parameter.
77
"""
88

99
# %%
@@ -18,7 +18,9 @@
1818
# masses.
1919
# Use shoreline data with (l)ow resolution and set the grid spacing to
2020
# 5 arc-minutes in x- and y-directions.
21-
grid = pygmt.grdlandmask(region=region, spacing="5m", maskvalues=[0, 1], resolution="l")
21+
grid = pygmt.grdlandmask(
22+
region=region, spacing="5m", mask_values=[0, 1], resolution="l"
23+
)
2224

2325
# Plot clipped grid
2426
fig.basemap(region=region, projection="M12c", frame=True)

examples/gallery/lines/wiggle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
tracks. ``x``, ``y``, ``z`` can be specified as 1-D arrays or within a
77
specified file. The ``scale`` parameter can be used to set the scale of the
88
anomaly in data/distance units. The positive and/or negative areas can be
9-
filled with color by setting the ``fillpositive`` and/or ``fillnegative``
9+
filled with color by setting the ``positive_fill`` and/or ``negative_fill``
1010
parameters.
1111
"""
1212

@@ -28,9 +28,9 @@
2828
# Set anomaly scale to 20 centimeters
2929
scale="20c",
3030
# Fill positive areas red
31-
fillpositive="red",
31+
positive_fill="red",
3232
# Fill negative areas gray
33-
fillnegative="gray",
33+
negative_fill="gray",
3434
# Set the outline width to 1.0 point
3535
pen="1.0p",
3636
# Draw a blue track with a width of 0.5 points

examples/gallery/maps/shorelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
fig = pygmt.Figure()
1212
# Make a global Mollweide map with automatic ticks
1313
fig.basemap(region="g", projection="W15c", frame=True)
14-
# Display the shorelines as black lines with 0.5 point thickness
14+
# Display the shorelines as black lines with 0.5-point thickness
1515
fig.coast(shorelines="0.5p,black")
1616
fig.show()

examples/gallery/seismology/meca.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
Focal mechanisms
33
================
44
5-
The :meth:`pygmt.Figure.meca` method can plot focal mechanisms or beachballs.
6-
We can specify the focal mechanism nodal planes or moment tensor components
7-
as a dictionary using the ``spec`` parameter (or they can be specified as a
8-
1-D or 2-D array, or within a file). The size of the beachballs can be set
9-
using the ``scale`` parameter. The compressive and extensive quadrants can
10-
be filled either with a color or a pattern via the ``compressionfill`` and
11-
``extensionfill`` parameters, respectively. Use the ``pen`` parameter to
12-
adjust the outline of the beachballs.
5+
The :meth:`pygmt.Figure.meca` method can plot focal mechanisms or beachballs. We can
6+
specify the focal mechanism nodal planes or moment tensor components as a dictionary
7+
using the ``spec`` parameter (or they can be specified as a 1-D or 2-D array, or within
8+
a file). The size of the beachballs can be set using the ``scale`` parameter. The
9+
compressive and extensive quadrants can be filled either with a color or a pattern via
10+
the ``compression_fill`` and ``extension_fill`` parameters, respectively. Use the
11+
``pen`` parameter to adjust the outline of the beachballs.
1312
"""
1413

1514
# %%
@@ -41,11 +40,11 @@
4140
depth=12.0,
4241
# Fill compressive quadrants with color "red"
4342
# [Default is "black"]
44-
compressionfill="red",
43+
compression_fill="red",
4544
# Fill extensive quadrants with color "cornsilk"
4645
# [Default is "white"]
47-
extensionfill="cornsilk",
48-
# Draw a 0.5 points thick dark gray ("gray30") solid outline via
46+
extension_fill="cornsilk",
47+
# Draw a 0.5-point thick dark gray ("gray30") solid outline via
4948
# the pen parameter [Default is "0.25p,black,solid"]
5049
pen="0.5p,gray30,solid",
5150
)

examples/gallery/seismology/velo_arrow_ellipse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
projection="x0.8c",
3434
frame=["WSne", "2g2f"],
3535
spec="e0.2/0.39+f18",
36-
uncertaintyfill="lightblue1",
36+
uncertainty_fill="lightblue1",
3737
pen="0.6p,red",
3838
line=True,
3939
vector="0.3c+p1p+e+gred",

examples/gallery/symbols/patterns.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
1010
- :meth:`pygmt.Figure.coast`: Land and water masses via ``land`` and ``water``
1111
- :meth:`pygmt.Figure.histogram`: Histogram bars via ``fill``
12-
- :meth:`pygmt.Figure.meca`: Focal mechanisms via ``compressionfill`` and
13-
``extensionfill``
12+
- :meth:`pygmt.Figure.meca`: Focal mechanisms via ``compression_fill`` and
13+
``extension_fill``
1414
- :meth:`pygmt.Figure.plot`: Symbols and polygons via ``fill``
1515
- :meth:`pygmt.Figure.rose`: Histogram sectors via ``fill``
1616
- :meth:`pygmt.Figure.solar`: Day-light terminators via ``fill``
1717
- :meth:`pygmt.Figure.ternary`: Symbols via ``fill``
1818
- :meth:`pygmt.Figure.velo`: Uncertainty wedges and velocity error ellipses via
19-
``uncertaintyfill``
20-
- :meth:`pygmt.Figure.wiggle`: Anomalies via ``fillpositive`` and ``fillnegative``
19+
``uncertainty_fill``
20+
- :meth:`pygmt.Figure.wiggle`: Anomalies via ``positive_fill`` and ``negative_fill``
2121
2222
GMT provides 90 predefined 1-bit patterns, which are numbered from 1 to 90. In addition,
2323
custom 1-, 8-, or 24-bit image raster files can also be used as patterns.

examples/tutorials/advanced/3d_perspective_image.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
fig.show()
5656

5757
# %%
58-
# The ``plane`` parameter sets the elevation and color of a plane that provides
59-
# a fill below the surface relief.
58+
# The ``plane`` parameter sets the elevation and color of a plane that provides a fill
59+
# below the surface relief.
6060

6161
fig = pygmt.Figure()
6262
fig.grdview(
@@ -67,8 +67,8 @@
6767
zsize="1.5c",
6868
surftype="s",
6969
cmap="geo",
70-
# Set the plane elevation to 1,000 meters and make the fill "gray"
71-
plane="1000+ggray",
70+
plane=1000, # Set the plane elevation to 1,000 meters
71+
facade_fill="gray", # Color the facade in "gray"
7272
)
7373
fig.show()
7474

@@ -90,8 +90,9 @@
9090
zsize="1.5c",
9191
surftype="s",
9292
cmap="geo",
93-
plane="1000+ggrey",
94-
# Set the contour pen thickness to "0.1p"
93+
plane=1000,
94+
facade_fill="gray",
95+
# Set the contour pen thickness to 0.1 points
9596
contour_pen="0.1p",
9697
)
9798
fig.colorbar(perspective=True, frame=["a500", "x+lElevation", "y+lm"])

0 commit comments

Comments
 (0)