Skip to content

Commit 57121bf

Browse files
Move section for *fill up
1 parent 4055d02 commit 57121bf

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

examples/tutorials/advanced/focal_mechanisms.py

+30-30
Original file line numberDiff line numberDiff line change
@@ -76,76 +76,76 @@
7676

7777

7878
# %%
79-
# Filling the quadrants
80-
# ---------------------
79+
# Plotting the components of a seismic moment tensor
80+
# --------------------------------------------------
8181
#
82-
# Use the parameters ``compressionfill`` and ``extensionfill`` to fill the quadrants
83-
# with different colors or patterns. Regarding pattern see the gallery example
84-
# :doc:`Bit and hachure patterns </gallery/symbols/patterns>` and the Technical
85-
# Reference :doc:`Bit and hachure patterns </techref/patterns>`.
82+
# A moment tensor can be decomposed into isotropic and deviatoric parts, and deviatoric
83+
# part can be further decomposed into multiple parts (e.g., a double couple and a
84+
# compensated linear vector dipole (CLVD)). Use the ``component`` parameter to specify
85+
# the component you want to plot.
8686

8787
fig = pygmt.Figure()
8888
fig.basemap(region=region, projection=projection, frame=frame)
8989

9090
fig.meca(
9191
spec=mt_dict_single,
9292
scale="1c",
93-
longitude=-2,
93+
longitude=-3,
9494
latitude=0,
9595
depth=0,
96-
compressionfill="darkorange",
97-
extensionfill="cornsilk",
96+
component="full", # full seismic moment tensor
97+
)
98+
fig.meca(
99+
spec=mt_dict_single,
100+
scale="1c",
101+
longitude=0,
102+
latitude=0,
103+
depth=0,
104+
component="dc", # closest double couple
98105
)
99-
100106
fig.meca(
101107
spec=mt_dict_single,
102108
scale="1c",
103109
longitude=2,
104110
latitude=0,
105111
depth=0,
106-
compressionfill="p8",
107-
extensionfill="p31",
108-
outline=True,
112+
component="deviatoric", # deviatoric part
109113
)
110114

111115
fig.show()
112116

113117

114118
# %%
115-
# Plotting the components of a seismic moment tensor
116-
# --------------------------------------------------
119+
# Filling the quadrants
120+
# ---------------------
117121
#
118-
# A moment tensor can be decomposed into isotropic and deviatoric parts, and deviatoric
119-
# part can be further decomposed into multiple parts (e.g., a double couple and a
120-
# compensated linear vector dipole (CLVD)). Use the ``component`` parameter to specify
121-
# the component to plot.
122+
# Use the parameters ``compressionfill`` and ``extensionfill`` to fill the quadrants
123+
# with different colors or patterns. Regarding patterns see the gallery example
124+
# :doc:`Bit and hachure patterns </gallery/symbols/patterns>` and the Technical
125+
# Reference :doc:`Bit and hachure patterns </techref/patterns>`.
122126

123127
fig = pygmt.Figure()
124128
fig.basemap(region=region, projection=projection, frame=frame)
125129

126130
fig.meca(
127131
spec=mt_dict_single,
128132
scale="1c",
129-
longitude=-3,
130-
latitude=0,
131-
depth=0,
132-
component="full", # full seismic moment tensor
133-
)
134-
fig.meca(
135-
spec=mt_dict_single,
136-
scale="1c",
137-
longitude=0,
133+
longitude=-2,
138134
latitude=0,
139135
depth=0,
140-
component="dc", # closest double couple
136+
compressionfill="darkorange",
137+
extensionfill="cornsilk",
141138
)
139+
142140
fig.meca(
143141
spec=mt_dict_single,
144142
scale="1c",
145143
longitude=2,
146144
latitude=0,
147145
depth=0,
148-
component="deviatoric", # deviatoric part
146+
compressionfill="p8",
147+
extensionfill="p31",
148+
outline=True,
149149
)
150150

151151
fig.show()

0 commit comments

Comments
 (0)