|
14 | 14 | y = np.array([20, 20])
|
15 | 15 |
|
16 | 16 | 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"') |
20 | 18 |
|
21 | 19 | # Plot the line using different front styles
|
22 | 20 | 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", |
25 | 23 | # line with box front style
|
26 |
| - "f1c/0.25c+b", |
| 24 | + "f1c/0.25c+b", |
27 | 25 | # line with circle front style
|
28 |
| - "f1c/0.25c+c", |
| 26 | + "f1c/0.25c+c", |
29 | 27 | # 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 |
32 | 30 | # offset to 2.25 cm
|
33 |
| - "f5c/1c+l+s45+o2.25c", |
| 31 | + "f5c/1c+l+s45+o2.25c", |
34 | 32 | # 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", |
36 | 34 | # line with circle front style, symbols are plotted on the right side of the front
|
37 | 35 | "f1c/0.4c+c+r",
|
38 | 36 | # 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", |
40 | 38 | # 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", |
42 | 40 | # line with triangle front style, symbols are plotted on the right side of the front
|
43 | 41 | # 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", |
45 | 43 | # line with triangle front style, symbols are plotted on the right side of the front
|
46 | 44 | # 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", |
48 | 46 | # line with triangle front style, symbols are plotted on the right side of the front
|
49 | 47 | # 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", |
51 | 49 | ]:
|
52 | 50 | y -= 1 # vove the current line down
|
53 | 51 | 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 | + ) |
55 | 60 |
|
56 | 61 | fig.show()
|
0 commit comments