|
37 | 37 | fig.basemap(region=[108, 120, -5, 8], projection="M20c", frame="a")
|
38 | 38 | fig.coast(land="black", water="skyblue")
|
39 | 39 |
|
40 |
| -# Plotting text annotations using single elements |
| 40 | +# Plot text annotations using a single element |
41 | 41 | fig.text(text="SOUTH CHINA SEA", x=112, y=6)
|
42 | 42 |
|
43 |
| -# Plotting text annotations using lists of elements |
| 43 | +# Plot text annotations using lists of elements |
44 | 44 | fig.text(text=["CELEBES SEA", "JAVA SEA"], x=[119, 112], y=[3.25, -4.6])
|
45 | 45 |
|
46 | 46 | fig.show()
|
|
51 | 51 | # The size, family/weight, and color of an annotation can be specified using
|
52 | 52 | # the ``font`` parameter.
|
53 | 53 | #
|
54 |
| -# A list of all recognised fonts can be found at |
55 |
| -# :gmt-docs:`cookbook/postscript-fonts.html`, including details of how to use |
56 |
| -# non-default fonts. |
| 54 | +# A list of all recognized fonts can be found at |
| 55 | +# :gmt-docs:`PostScript Fonts Used by GMT <cookbook/postscript-fonts.html>`, |
| 56 | +# including details of how to use non-default fonts. |
57 | 57 |
|
58 | 58 | fig = pygmt.Figure()
|
59 | 59 | with pygmt.config(MAP_FRAME_TYPE="plain"):
|
60 | 60 | fig.basemap(region=[108, 120, -5, 8], projection="M20c", frame="a")
|
61 | 61 | fig.coast(land="black", water="skyblue")
|
62 | 62 |
|
63 |
| -# Customising the font style |
| 63 | +# Customize the font style |
64 | 64 | fig.text(text="BORNEO", x=114.0, y=0.5, font="22p,Helvetica-Bold,white")
|
65 | 65 |
|
66 | 66 | fig.show()
|
|
88 | 88 |
|
89 | 89 | # Plot region names / sea names from a text file, where
|
90 | 90 | # the longitude (x) and latitude (y) coordinates are in the first two columns.
|
91 |
| -# Setting angle/font/justify to ``True`` will indicate that those columns are |
| 91 | +# Setting angle/font/justify to True will indicate that those columns are |
92 | 92 | # present in the text file too (Note: must be in that order!).
|
93 | 93 | # Finally, the text to be printed will be in the last column
|
94 | 94 | fig.text(textfiles="examples.txt", angle=True, font=True, justify=True)
|
|
0 commit comments