|
76 | 76 |
|
77 | 77 |
|
78 | 78 | # %%
|
79 |
| -# Filling the quadrants |
80 |
| -# --------------------- |
| 79 | +# Plotting the components of a seismic moment tensor |
| 80 | +# -------------------------------------------------- |
81 | 81 | #
|
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. |
86 | 86 |
|
87 | 87 | fig = pygmt.Figure()
|
88 | 88 | fig.basemap(region=region, projection=projection, frame=frame)
|
89 | 89 |
|
90 | 90 | fig.meca(
|
91 | 91 | spec=mt_dict_single,
|
92 | 92 | scale="1c",
|
93 |
| - longitude=-2, |
| 93 | + longitude=-3, |
94 | 94 | latitude=0,
|
95 | 95 | 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 |
98 | 105 | )
|
99 |
| - |
100 | 106 | fig.meca(
|
101 | 107 | spec=mt_dict_single,
|
102 | 108 | scale="1c",
|
103 | 109 | longitude=2,
|
104 | 110 | latitude=0,
|
105 | 111 | depth=0,
|
106 |
| - compressionfill="p8", |
107 |
| - extensionfill="p31", |
108 |
| - outline=True, |
| 112 | + component="deviatoric", # deviatoric part |
109 | 113 | )
|
110 | 114 |
|
111 | 115 | fig.show()
|
112 | 116 |
|
113 | 117 |
|
114 | 118 | # %%
|
115 |
| -# Plotting the components of a seismic moment tensor |
116 |
| -# -------------------------------------------------- |
| 119 | +# Filling the quadrants |
| 120 | +# --------------------- |
117 | 121 | #
|
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>`. |
122 | 126 |
|
123 | 127 | fig = pygmt.Figure()
|
124 | 128 | fig.basemap(region=region, projection=projection, frame=frame)
|
125 | 129 |
|
126 | 130 | fig.meca(
|
127 | 131 | spec=mt_dict_single,
|
128 | 132 | 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, |
138 | 134 | latitude=0,
|
139 | 135 | depth=0,
|
140 |
| - component="dc", # closest double couple |
| 136 | + compressionfill="darkorange", |
| 137 | + extensionfill="cornsilk", |
141 | 138 | )
|
| 139 | + |
142 | 140 | fig.meca(
|
143 | 141 | spec=mt_dict_single,
|
144 | 142 | scale="1c",
|
145 | 143 | longitude=2,
|
146 | 144 | latitude=0,
|
147 | 145 | depth=0,
|
148 |
| - component="deviatoric", # deviatoric part |
| 146 | + compressionfill="p8", |
| 147 | + extensionfill="p31", |
| 148 | + outline=True, |
149 | 149 | )
|
150 | 150 |
|
151 | 151 | fig.show()
|
|
0 commit comments