Skip to content

Commit e22975b

Browse files
committed
[format-command] fixes
1 parent f4ec1f9 commit e22975b

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

examples/gallery/line/linefronts.py

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,48 @@
1414
y = np.array([20, 20])
1515

1616
fig = pygmt.Figure()
17-
fig.basemap(
18-
region=[0, 10, 0, 20], projection="X16c/15c", frame='+t"Line Fronts"'
19-
)
17+
fig.basemap(region=[0, 10, 0, 20], projection="X16c/15c", frame='+t"Line Fronts"')
2018

2119
# Plot the line using different front styles
2220
for frontstyle in [
23-
# line with "faults" front style, same as +f (default)
24-
"f1c/0.25c",
21+
# line with "faults" front style, same as +f (default)
22+
"f1c/0.25c",
2523
# line with box front style
26-
"f1c/0.25c+b",
24+
"f1c/0.25c+b",
2725
# line with circle front style
28-
"f1c/0.25c+c",
26+
"f1c/0.25c+c",
2927
# line with triangle front style
30-
"f1c/0.3c+t",
31-
# line with left-lateral "slip" front style, angle is set to 45 and
28+
"f1c/0.3c+t",
29+
# line with left-lateral "slip" front style, angle is set to 45 and
3230
# offset to 2.25 cm
33-
"f5c/1c+l+s45+o2.25c",
31+
"f5c/1c+l+s45+o2.25c",
3432
# line with "faults" front style, symbols are plotted on the left side of the front
35-
"f1c/0.4c+l",
33+
"f1c/0.4c+l",
3634
# line with circle front style, symbols are plotted on the right side of the front
3735
"f1c/0.4c+c+r",
3836
# line with box front style, symbols are plotted on the left side of the front
39-
"f1c/0.3c+b+l",
37+
"f1c/0.3c+b+l",
4038
# line with triangle front style, symbols are plotted on the left side of the front
41-
"f1c/0.3c+l+t",
39+
"f1c/0.3c+l+t",
4240
# line with triangle front style, symbols are plotted on the right side of the front
4341
# and offset is set to 0.5 cm, use other pen for the outline of the symbol
44-
"f1c/0.4c+r+t+o0.5c+p1.5p,dodgerblue",
42+
"f1c/0.4c+r+t+o0.5c+p1.5p,dodgerblue",
4543
# line with triangle front style, symbols are plotted on the right side of the front
4644
# and offset is set to 0.3 cm, skip the outline
47-
"f0.5c/0.3c+r+t+o0.3c+p",
45+
"f0.5c/0.3c+r+t+o0.3c+p",
4846
# line with triangle front style, symbols are plotted on the right side of the front
4947
# and offset is set to 0.3 cm, skip the outline and make the main front line invisible
50-
"f0.5c/0.3c+r+t+o0.3c+p+i",
48+
"f0.5c/0.3c+r+t+o0.3c+p+i",
5149
]:
5250
y -= 1 # vove the current line down
5351
fig.plot(x=x, y=y, pen="1.25p", style=frontstyle, color="red3")
54-
fig.text(x=x[-1], y=y[-1], text=frontstyle, font="Courier-Bold", justify="ML", offset="0.75c/0c")
52+
fig.text(
53+
x=x[-1],
54+
y=y[-1],
55+
text=frontstyle,
56+
font="Courier-Bold",
57+
justify="ML",
58+
offset="0.75c/0c",
59+
)
5560

5661
fig.show()

0 commit comments

Comments
 (0)