You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/tutorials/basics/frames.rst
+38-11
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
Frames, ticks, titles, and labels
2
-
-----------------------
2
+
---------------------------------
3
3
4
4
Setting frame, ticks, title, etc., of the plot is handled by the :gmt-module:`-B <basemap#b>` parameter that most plotting modules contain like :gmt-module:`basemap`.
5
5
@@ -10,14 +10,14 @@ By default, GMT does not add a frame to your plot. For example, we can plot
10
10
the coastlines of the world with a Mercator projection:
11
11
12
12
13
-
.. gmtplot::
13
+
.. gmtplot::
14
14
15
-
gmt begin frames png
16
-
gmt coast -R-180/180/-60/60 -JM25c -W
17
-
gmt end show
15
+
gmt begin frames png
16
+
gmt coast -R-180/180/-60/60 -JM25c -W
17
+
gmt end show
18
18
19
19
20
-
To add the default GMT frame style to the plot, add **f** to the :gmt-module:`-B <basemap#b>`.
20
+
To add the default GMT frame style to the plot, add ``f`` to the :gmt-module:`-B <basemap#b>`.
21
21
22
22
23
23
.. gmtplot::
@@ -29,9 +29,9 @@ To add the default GMT frame style to the plot, add **f** to the :gmt-module:`-B
29
29
30
30
31
31
Tick labels
32
-
~~~~~~~~~~
32
+
~~~~~~~~~~~
33
33
34
-
In GMT the tick labels are called annotations. Add them by passing **a** through the :gmt-module:`-B <basemap#b>` parameter:
34
+
In GMT the tick labels are called annotations. Add them by passing ``a`` through the :gmt-module:`-B <basemap#b>` parameter:
35
35
36
36
.. gmtplot::
37
37
@@ -45,7 +45,7 @@ In GMT the tick labels are called annotations. Add them by passing **a** through
45
45
Gridlines
46
46
~~~~~~~~~~
47
47
48
-
Add automatic grid lines to the plot by adding **g**:
48
+
Add automatic grid lines to the plot by adding ``g``:
49
49
50
50
51
51
.. gmtplot::
@@ -56,10 +56,24 @@ Add automatic grid lines to the plot by adding **g**:
56
56
gmt end show
57
57
58
58
59
+
Custom annotations and intervals
60
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61
+
62
+
To adjust the step widths of annotations, frame, and grid lines we can
63
+
add the desired step widths after ``a``, ``f``, or ``g``. In the example
64
+
below, the step widths are set to 30°, 7.5°, and 15°, respectively.
65
+
66
+
.. gmtplot::
67
+
68
+
gmt begin frames png
69
+
gmt coast -R-180/180/-60/60 -JM25c -W
70
+
gmt basemap -Ba30f7.5g15
71
+
gmt end show
72
+
59
73
Title
60
-
~~~~~~~~~~
74
+
~~~~~
61
75
62
-
The figure title can be set by passing **+ttitle**:
76
+
The figure title can be set by passing ``+ttitle``:
63
77
64
78
.. gmtplot::
65
79
@@ -68,3 +82,16 @@ The figure title can be set by passing **+ttitle**:
0 commit comments