|
11 | 11 |
|
12 | 12 | # Generate a profile of points to plot
|
13 | 13 | region = [-126, -65, 25, 52]
|
14 |
| -x = np.linspace(-100, -100, 12) # x vector coordinates |
15 |
| -y = np.linspace(29, 47, 12) # y vector coordinates |
| 14 | +x = np.linspace(-100, -100, 12) # x vector coordinates |
| 15 | +y = np.linspace(29, 47, 12) # y vector coordinates |
16 | 16 | xvec = np.linspace(1, 5, 12) # dx vector data
|
17 |
| -yvec = np.zeros(np.shape(y)) # dy vector data |
| 17 | +yvec = np.zeros(np.shape(y)) # dy vector data |
18 | 18 |
|
19 | 19 | fig = pygmt.Figure()
|
20 | 20 | # Create a 15x15 cm basemap with a Mercator projection (M) using the data region
|
21 |
| -fig.coast(region=region, projection="M15c", B="10.0", N='1', A='2000', W='0.5p,black') |
| 21 | +fig.coast(region=region, projection="M15c", B="10.0", N="1", A="2000", W="0.5p,black") |
22 | 22 | # Plot vectors using:
|
23 | 23 | # v0.2: vector size
|
24 | 24 | # e: vector head at end
|
|
27 | 27 | # p: vector-head pen
|
28 | 28 | # z: denotes vector's data in dx, dy (default is polar)
|
29 | 29 | # direction: data arrays
|
30 |
| -fig.plot(x=x, y=y, style='v0.2+e+a40+gred+h0+p1p,red+z0.35', pen='1.0p,red', direction=[xvec, yvec]) |
| 30 | +fig.plot( |
| 31 | + x=x, |
| 32 | + y=y, |
| 33 | + style="v0.2+e+a40+gred+h0+p1p,red+z0.35", |
| 34 | + pen="1.0p,red", |
| 35 | + direction=[xvec, yvec], |
| 36 | +) |
31 | 37 | fig.show()
|
0 commit comments