Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

inset.rst 5.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
  1. .. index:: ! inset
  2. .. include:: module_core_purpose.rst_
  3. *****
  4. inset
  5. *****
  6. |inset_purpose|
  7. The **inset** module is used to carve out a sub-region of the current plot canvas and
  8. restrict further plotting to that section of the canvas. The inset setup is started with the **begin**
  9. directive that defines the placement and size of the inset. Subsequent plot commands will be directed
  10. to that window. The inset is completed via the **end** directive, which reverts operations to the full
  11. canvas and restores the plot region and map projection that was in effect prior to the setup of the inset.
  12. Synopsis (begin mode)
  13. ---------------------
  14. .. include:: common_SYN_OPTs.rst_
  15. **gmt inset begin**
  16. |-D|\ *inset-box*
  17. [ |-F|\ *box* ]
  18. [ |-M|\ *margins* ]
  19. [ |-N| ]
  20. [ |SYN_OPT-V| ]
  21. [ |SYN_OPT--| ]
  22. |No-spaces|
  23. Description
  24. -----------
  25. The **begin** directive of **inset** defines the dimension and placement of the inset canvas. It
  26. records the current region and projection so that we may return to the initial
  27. plot environment when the inset is completed. The user may select any plot region
  28. and projection once plotting in the inset, but if the first command uses
  29. ? as scale or width then we adjust the scale or width to fill the inset as best
  30. as possible, given the inset size and margins (if selected).
  31. Required Arguments
  32. ------------------
  33. .. _-D:
  34. **-D**\ *xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*]] \| **-D**\ [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *width*\ [/*height*][**+j**\ *justify*][**+o**\ *dx*\ [/*dy*]]
  35. Define the map inset rectangle on the map. Specify the rectangle in one of three ways:
  36. .. include:: explain_refpoint.rst_
  37. Alternatively, Give *west/east/south/north* of geographic rectangle bounded by parallels
  38. and meridians; append **+r** if the coordinates instead are the lower left and
  39. upper right corners of the desired rectangle. (Or, give *xmin/xmax/ymin/ymax*
  40. of bounding rectangle in projected coordinates and optionally append **+u**\ *unit* [Default coordinate unit is meter (e)].
  41. Append **+w**\ *width*\ [/*height*] of bounding rectangle or box in plot coordinates (inches, cm, etc.).
  42. By default, the anchor point on the scale is assumed to be the bottom left corner (BL), but this
  43. can be changed by appending **+j** followed by a 2-char justification code *justify* (see :doc:`text`).
  44. **Note**: If **-Dj** is used then *justify* defaults to the same as *refpoint*,
  45. if **-DJ** is used then *justify* defaults to the mirror opposite of *refpoint*.
  46. Specify inset box attributes via the **-F** option [outline only].
  47. Optional Arguments
  48. ------------------
  49. .. _-F:
  50. **-F**\ [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]][**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]]
  51. Without further options, draws a rectangular border around the map inset using
  52. :term:`MAP_FRAME_PEN`; specify a different pen with **+p**\ *pen*.
  53. Add **+g**\ *fill* to fill the logo box [no fill].
  54. Append **+c**\ *clearance* where *clearance* is either *gap*, *xgap*\ /\ *ygap*,
  55. or *lgap*\ /\ *rgap*\ /\ *bgap*\ /\ *tgap* where these items are uniform, separate in
  56. x- and y-direction, or individual side spacings between logo and border.
  57. Append **+i** to draw a secondary, inner border as well. We use a uniform
  58. *gap* between borders of 2\ **p** and the :term:`MAP_DEFAULT_PEN`
  59. unless other values are specified. Append **+r** to draw rounded
  60. rectangular borders instead, with a 6\ **p** corner radius. You can
  61. override this radius by appending another value. Finally, append
  62. **+s** to draw an offset background shaded region. Here, *dx*/*dy*
  63. indicates the shift relative to the foreground frame
  64. [4\ **p**/-4\ **p**] and *shade* sets the fill style to use for shading [gray50].
  65. .. _-M:
  66. **-M**\ *margins*
  67. This is clearance that is added around the inside of the inset. Plotting will take place
  68. within the inner region only. The margins can be a single value, a pair of values separated by slashes
  69. (for setting separate horizontal and vertical margins), or the full set of four margins (for setting
  70. separate left, right, bottom, and top margins) [no margins].
  71. .. _-N:
  72. **-N**
  73. Do NOT clip features extruding outside map inset boundaries [Default will clip].
  74. .. _-V:
  75. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  76. .. include:: explain_-V.rst_
  77. .. include:: explain_help_nopar.rst_
  78. Synopsis (end mode)
  79. -------------------
  80. **gmt inset end** [ |SYN_OPT-V| ]
  81. The **end** directive finalizes the current inset, which returns the plotting environment to
  82. the state prior to the start of the inset. The previous region and map projection will be
  83. in effect going forward.
  84. Optional Arguments
  85. ------------------
  86. .. _inset_end-V:
  87. .. include:: explain_-V.rst_
  88. .. include:: explain_help_nopar.rst_
  89. Examples
  90. --------
  91. To make a simple basemap plot called inset.pdf that demonstrates the inset module, try
  92. ::
  93. gmt begin inset pdf
  94. gmt basemap -R0/40/20/60 -JM6.5i -Bafg -B+glightgreen
  95. gmt inset begin -DjTR+w2.5i+o0.2i -F+gpink+p0.5p -M0.25i
  96. gmt basemap -Rg -JA20/20/2i -Bafg
  97. gmt text -F+f18p+cTR+tINSET -Dj-0.15i -N
  98. gmt inset end
  99. gmt text -F+f18p+cBL+tMAP -Dj0.2i
  100. gmt end
  101. See Also
  102. --------
  103. :doc:`begin`,
  104. :doc:`clear`,
  105. :doc:`docs`,
  106. :doc:`end`,
  107. :doc:`figure`,
  108. :doc:`gmt`,
  109. :doc:`subplot`
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...