Skip to content

Commit a378fad

Browse files
committed
improve some plotting
1 parent a6637a4 commit a378fad

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

hexrd/singlextal/phasetransformation/variants.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def plot_OR_mat(rmat, mat, fig, ax, title):
142142
font = {
143143
"family": "serif",
144144
"weight": "bold",
145-
"size": 20,
145+
"size": 12,
146146
}
147147

148148
Gs = get_symmetry_directions(mat)
@@ -167,20 +167,28 @@ def plot_OR_mat(rmat, mat, fig, ax, title):
167167
dip.append(np.degrees(np.arccos(xyz[2])))
168168
strike.append(180.0 + np.degrees(np.arctan2(xyz[1], xyz[0])))
169169

170-
ax.pole(strike, dip, m, markersize=16, markeredgecolor="red")
170+
ax.pole(strike, dip, m, markersize=12, markeredgecolor="red")
171+
ax.tick_params(axis="both", size=24)
172+
ax.grid(True, which="both", ls=":", lw=1)
173+
ax.set_longitude_grid(10)
174+
# ax.set_latitude_grid(10)
171175
ax.set_azimuth_ticks([])
172-
ax.tick_params(axis="both", which="major", size=24)
173-
ax.grid()
174176
ax.legend(leg, bbox_to_anchor=(1.15, 1.15), loc="upper right", prop=font)
175177
ax.set_title(title, **font)
176178

177179

178180
def plot_OR(rmat_parent, rmat_variants, mat1, mat2, fig=None, ax=None):
179181
if fig is None or ax is None:
180-
fig, ax = mplstereonet.subplots(ncols=2, figsize=(16, 8))
182+
fig, ax = mplstereonet.subplots(
183+
ncols=2, figsize=(10, 5), projection='equal_angle_stereonet'
184+
)
181185

182186
plot_OR_mat(rmat_parent, mat1, fig, ax[0], title="Parent")
183187
plot_OR_mat(rmat_variants, mat2, fig, ax[1], title="Variants")
188+
# cosmetic
189+
fig.subplots_adjust(
190+
hspace=0, wspace=0.05, left=0.01, bottom=0.1, right=0.99
191+
)
184192
fig.show()
185193

186194

0 commit comments

Comments
 (0)