|
11 | 11 |
|
12 | 12 | # %% |
13 | 13 | import pygmt |
| 14 | +from pygmt.params import Axis, Frame |
14 | 15 |
|
15 | 16 | # Set up same sample data |
16 | 17 | x = [2.2, 3.3, -3.1, -3.7, -0.1] |
|
21 | 22 |
|
22 | 23 | # ----------------------------------------------------------------------------- |
23 | 24 | # Left: record order |
24 | | -fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["WSne", "af"]) |
| 25 | +fig.basemap( |
| 26 | + region=[-5, 5, -5, 5], |
| 27 | + projection="X6c", |
| 28 | + frame=Frame(axes="WSne", axis=Axis(annot=True, tick=True)), |
| 29 | +) |
25 | 30 |
|
26 | 31 | # Connect data points based on the record order [Default connection=None] |
27 | 32 | fig.plot(x=x, y=y, pen="1.5p,dodgerblue") |
|
32 | 37 |
|
33 | 38 | # ----------------------------------------------------------------------------- |
34 | 39 | # Middle: network |
35 | | -fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"]) |
| 40 | +fig.basemap( |
| 41 | + region=[-5, 5, -5, 5], |
| 42 | + projection="X6c", |
| 43 | + frame=Frame(axes="wSne", axis=Axis(annot=True, tick=True)), |
| 44 | +) |
36 | 45 |
|
37 | 46 | # Connect data points as network |
38 | 47 | fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="n") |
|
43 | 52 |
|
44 | 53 | # ----------------------------------------------------------------------------- |
45 | 54 | # Right: reference point |
46 | | -fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"]) |
| 55 | +fig.basemap( |
| 56 | + region=[-5, 5, -5, 5], |
| 57 | + projection="X6c", |
| 58 | + frame=Frame(axes="wSne", axis=Axis(annot=True, tick=True)), |
| 59 | +) |
47 | 60 |
|
48 | 61 | # Connect data points with the reference point (0,0) |
49 | 62 | fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="p0/0") |
|
0 commit comments