|
6 | 6 | from pygmt.clib import Session
|
7 | 7 | from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias
|
8 | 8 |
|
9 |
| -__doctest_skip__ = ["inset"] |
10 |
| - |
11 |
| - |
12 | 9 | @fmt_docstring
|
13 | 10 | @contextlib.contextmanager
|
14 | 11 | @use_alias(
|
@@ -47,7 +44,7 @@ def inset(self, **kwargs):
|
47 | 44 |
|
48 | 45 | Append **g**\ *lon*/*lat* for map (user) coordinates,
|
49 | 46 | **j**\ *code* or **J**\ *code* for setting the *refpoint* via a
|
50 |
| - 2-char justification code \ that refers to the (invisible) |
| 47 | + 2-char justification code that refers to the (invisible) |
51 | 48 | projected map bounding box, **n**\ *xn*/*yn* for normalized (0-1)
|
52 | 49 | bounding box coordinates, or **x**\ *x*/*y* for plot
|
53 | 50 | coordinates (inches, cm, points, append unit).
|
@@ -109,34 +106,6 @@ def inset(self, **kwargs):
|
109 | 106 | {R}
|
110 | 107 | {J}
|
111 | 108 | {V}
|
112 |
| -
|
113 |
| - Examples |
114 |
| - -------- |
115 |
| - >>> import pygmt |
116 |
| - >>> |
117 |
| - >>> # Create the larger figure |
118 |
| - >>> fig = pygmt.Figure() |
119 |
| - >>> fig.coast(region="MG+r2", water="lightblue", shorelines="thin") |
120 |
| - >>> # Use a "with" statement to initialize the inset context manager. |
121 |
| - >>> # Seting the position to top left with an 0.2 cm offset and |
122 |
| - >>> # draw a green inset box. |
123 |
| - >>> # The inset size is determined by the region and projection parameters. |
124 |
| - >>> with fig.inset( |
125 |
| - ... position="jTL+o0.2c", |
126 |
| - ... margin=0, |
127 |
| - ... box="+pgreen", |
128 |
| - ... region="g", |
129 |
| - ... projection="G47/-20/3.5c", |
130 |
| - ... ): |
131 |
| - ... fig.coast( |
132 |
| - ... land="gray", |
133 |
| - ... water="white", |
134 |
| - ... dcw="MG+gred", |
135 |
| - ... ) |
136 |
| - >>> # Map elements outside the "with" block are plotted in the main figure |
137 |
| - >>> fig.logo(position="jBR+o0.2c+w3c") |
138 |
| - >>> fig.show() # doctest: +SKIP |
139 |
| - <IPython.core.display.Image object> |
140 | 109 | """
|
141 | 110 | kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access
|
142 | 111 | with Session() as lib:
|
|
0 commit comments