|
1 | 1 | """ |
2 | 2 | Base class with plot generating commands. |
| 3 | +
|
3 | 4 | Does not define any special non-GMT methods (savefig, show, etc). |
4 | 5 | """ |
5 | 6 | import contextlib |
@@ -52,7 +53,6 @@ def _preprocess(self, **kwargs): # pylint: disable=no-self-use |
52 | 53 | >>> base = BasePlotting() |
53 | 54 | >>> base._preprocess(resolution="low") |
54 | 55 | {'resolution': 'low'} |
55 | | -
|
56 | 56 | """ |
57 | 57 | return kwargs |
58 | 58 |
|
@@ -266,7 +266,6 @@ def colorbar(self, **kwargs): |
266 | 266 | {XY} |
267 | 267 | {p} |
268 | 268 | {t} |
269 | | -
|
270 | 269 | """ |
271 | 270 | kwargs = self._preprocess(**kwargs) |
272 | 271 | with Session() as lib: |
@@ -295,7 +294,7 @@ def colorbar(self, **kwargs): |
295 | 294 | @kwargs_to_strings(R="sequence", L="sequence", A="sequence_plus", p="sequence") |
296 | 295 | def grdcontour(self, grid, **kwargs): |
297 | 296 | """ |
298 | | - Convert grids or images to contours and plot them on maps |
| 297 | + Convert grids or images to contours and plot them on maps. |
299 | 298 |
|
300 | 299 | Takes a grid file name or an xarray.DataArray object as input. |
301 | 300 |
|
@@ -511,7 +510,6 @@ def grdimage(self, grid, **kwargs): |
511 | 510 | {p} |
512 | 511 | {t} |
513 | 512 | {x} |
514 | | -
|
515 | 513 | """ |
516 | 514 | kwargs = self._preprocess(**kwargs) |
517 | 515 | kind = data_kind(grid, None, None) |
@@ -624,7 +622,6 @@ def grdview(self, grid, **kwargs): |
624 | 622 | {XY} |
625 | 623 | {p} |
626 | 624 | {t} |
627 | | -
|
628 | 625 | """ |
629 | 626 | kwargs = self._preprocess(**kwargs) |
630 | 627 | kind = data_kind(grid, None, None) |
@@ -827,7 +824,6 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs): |
827 | 824 | {t} |
828 | 825 | *transparency* can also be a 1d array to set varying transparency |
829 | 826 | for symbols. |
830 | | -
|
831 | 827 | """ |
832 | 828 | kwargs = self._preprocess(**kwargs) |
833 | 829 |
|
@@ -900,7 +896,7 @@ def plot3d( |
900 | 896 | self, x=None, y=None, z=None, data=None, sizes=None, direction=None, **kwargs |
901 | 897 | ): |
902 | 898 | """ |
903 | | - Plot lines, polygons, and symbols in 3-D |
| 899 | + Plot lines, polygons, and symbols in 3-D. |
904 | 900 |
|
905 | 901 | Takes a matrix, (x,y,z) triplets, or a file name as input and plots |
906 | 902 | lines, polygons, or symbols at those locations in 3-D. |
@@ -1010,7 +1006,6 @@ def plot3d( |
1010 | 1006 | {t} |
1011 | 1007 | *transparency* can also be a 1d array to set varying transparency |
1012 | 1008 | for symbols. |
1013 | | -
|
1014 | 1009 | """ |
1015 | 1010 | kwargs = self._preprocess(**kwargs) |
1016 | 1011 |
|
@@ -1132,7 +1127,6 @@ def contour(self, x=None, y=None, z=None, data=None, **kwargs): |
1132 | 1127 | {XY} |
1133 | 1128 | {p} |
1134 | 1129 | {t} |
1135 | | -
|
1136 | 1130 | """ |
1137 | 1131 | kwargs = self._preprocess(**kwargs) |
1138 | 1132 |
|
@@ -1208,7 +1202,6 @@ def basemap(self, **kwargs): |
1208 | 1202 | {XY} |
1209 | 1203 | {p} |
1210 | 1204 | {t} |
1211 | | -
|
1212 | 1205 | """ |
1213 | 1206 | kwargs = self._preprocess(**kwargs) |
1214 | 1207 | if not ("B" in kwargs or "L" in kwargs or "Td" in kwargs or "Tm" in kwargs): |
@@ -1267,7 +1260,6 @@ def logo(self, **kwargs): |
1267 | 1260 | {V} |
1268 | 1261 | {XY} |
1269 | 1262 | {t} |
1270 | | -
|
1271 | 1263 | """ |
1272 | 1264 | kwargs = self._preprocess(**kwargs) |
1273 | 1265 | with Session() as lib: |
@@ -1715,17 +1707,20 @@ def meca( |
1715 | 1707 | # pylint: disable=too-many-statements |
1716 | 1708 |
|
1717 | 1709 | def set_pointer(data_pointers, spec): |
1718 | | - """Set optional parameter pointers based on DataFrame or dict, if |
1719 | | - those parameters are present in the DataFrame or dict.""" |
| 1710 | + """ |
| 1711 | + Set optional parameter pointers based on DataFrame or dict, if |
| 1712 | + those parameters are present in the DataFrame or dict. |
| 1713 | + """ |
1720 | 1714 | for param in list(data_pointers.keys()): |
1721 | 1715 | if param in spec: |
1722 | 1716 | # set pointer based on param name |
1723 | 1717 | data_pointers[param] = spec[param] |
1724 | 1718 |
|
1725 | 1719 | def update_pointers(data_pointers): |
1726 | | - """Updates variables based on the location of data, as the |
1727 | | - following data can be passed as parameters or it can be |
1728 | | - contained in `spec`.""" |
| 1720 | + """ |
| 1721 | + Updates variables based on the location of data, as the following |
| 1722 | + data can be passed as parameters or it can be contained in `spec`. |
| 1723 | + """ |
1729 | 1724 | # update all pointers |
1730 | 1725 | longitude = data_pointers["longitude"] |
1731 | 1726 | latitude = data_pointers["latitude"] |
|
0 commit comments