|
10 | 10 | from pathlib import Path |
11 | 11 |
|
12 | 12 | import pygmt |
| 13 | +from pygmt.params import Axis, Frame |
13 | 14 |
|
14 | 15 | # %% |
15 | 16 | # Adding a single text label |
|
44 | 45 |
|
45 | 46 | # ----------------------------------------------------------------------------- |
46 | 47 | # Left: "font", "angle", and "offset" parameters |
47 | | -fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb") |
| 48 | +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=Frame(axes="rtlb")) |
48 | 49 |
|
49 | 50 | # Change font size, family/weight, color of the text |
50 | 51 | fig.text(x=0, y=3, text="my text", font="12p,Helvetica-Bold,blue") |
|
64 | 65 |
|
65 | 66 | # ----------------------------------------------------------------------------- |
66 | 67 | # Right: "justify" parameter |
67 | | -fig.basemap(region=[-1, 1, -1, 1], projection="X5c", frame="rtlb") |
| 68 | +fig.basemap(region=[-1, 1, -1, 1], projection="X5c", frame=Frame(axes="rtlb")) |
68 | 69 |
|
69 | 70 | # Plot markers for reference |
70 | 71 | fig.plot( |
|
103 | 104 |
|
104 | 105 | fig = pygmt.Figure() |
105 | 106 |
|
106 | | -fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb") |
| 107 | +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=Frame(axes="rtlb")) |
107 | 108 |
|
108 | 109 | # Add a box with a fill in green color |
109 | 110 | fig.text(x=0, y=3, text="My text", fill="green") |
|
156 | 157 | # and ``justify`` parameters can be provided. Here, we give a complete example. |
157 | 158 |
|
158 | 159 | fig = pygmt.Figure() |
159 | | -fig.basemap(region=[108, 121, -5, 8], projection="M10c", frame="a2f1") |
| 160 | +fig.basemap(region=[108, 121, -5, 8], projection="M10c", frame=Axis(annot=2, tick=1)) |
160 | 161 | fig.coast(land="darkgray", water="steelblue", shorelines="1/0.1p,gray30") |
161 | 162 |
|
162 | 163 | # Create space-delimited file with region / sea names: |
|
0 commit comments