@@ -70,6 +70,7 @@ def _preprocess(self, **kwargs): # pylint: disable=no-self-use
70
70
W = "shorelines" ,
71
71
G = "land" ,
72
72
S = "water" ,
73
+ U = "timestamp" ,
73
74
)
74
75
@kwargs_to_strings (R = "sequence" )
75
76
def coast (self , ** kwargs ):
@@ -100,34 +101,34 @@ def coast(self, **kwargs):
100
101
----------
101
102
{J}
102
103
{R}
103
- A : int, float, or str
104
+ area_thresh : int, float, or str
104
105
``'min_area[/min_level/max_level][+ag|i|s|S][+r|l][+ppercent]'``
105
106
Features with an area smaller than min_area in km^2 or of
106
107
hierarchical level that is lower than min_level or higher than
107
108
max_level will not be plotted.
108
109
{B}
109
110
C : str
110
111
Set the shade, color, or pattern for lakes and river-lakes.
111
- D : str
112
+ resolution : str
112
113
Selects the resolution of the data set to use ((f)ull, (h)igh,
113
114
(i)ntermediate, (l)ow, and (c)rude).
114
- G : str
115
+ land : str
115
116
Select filling or clipping of “dry” areas.
116
- I : str
117
+ rivers : str
117
118
``'river[/pen]'``
118
119
Draw rivers. Specify the type of rivers and [optionally] append pen
119
120
attributes.
120
- L : str
121
+ map_scale : str
121
122
``'[g|j|J|n|x]refpoint'``
122
123
Draws a simple map scale centered on the reference point specified.
123
- N : str
124
+ borders : str
124
125
``'border[/pen]'``
125
126
Draw political boundaries. Specify the type of boundary and
126
127
[optionally] append pen attributes
127
- S : str
128
+ water : str
128
129
Select filling or clipping of “wet” areas.
129
130
{U}
130
- W : str
131
+ shorelines : str
131
132
``'[level/]pen'``
132
133
Draw shorelines [Default is no shorelines]. Append pen attributes.
133
134
@@ -166,23 +167,24 @@ def colorbar(self, **kwargs):
166
167
167
168
Parameters
168
169
----------
169
- position (D) : str
170
+ position : str
170
171
``[g|j|J|n|x]refpoint[+wlength[/width]][+e[b|f][length]][+h|v]
171
172
[+jjustify][+m[a|c|l|u]][+n[txt]][+odx[/dy]]``. Defines the
172
173
reference point on the map for the color scale using one of four
173
- coordinate systems: (1) Use -Dg for map (user) coordinates, (2) use
174
- -Dj or -DJ for setting refpoint via a 2-char justification code
175
- that refers to the (invisible) map domain rectangle, (3) use -Dn
176
- for normalized (0-1) coordinates, or (4) use -Dx for plot
177
- coordinates (inches, cm, etc.). All but -Dx requires both -R and
178
- -J to be specified. Append +w followed by the length and width of
179
- the color bar. If width is not specified then it is set to 4% of
180
- the given length. Give a negative length to reverse the scale bar.
181
- Append +h to get a horizontal scale [Default is vertical (+v)]. By
182
- default, the anchor point on the scale is assumed to be the bottom
183
- left corner (BL), but this can be changed by appending +j followed
184
- by a 2-char justification code justify.
185
- box (F) : bool or str
174
+ coordinate systems: (1) Use *g* for map (user) coordinates, (2) use
175
+ *j* or *J* for setting refpoint via a 2-char justification code
176
+ that refers to the (invisible) map domain rectangle, (3) use *n*
177
+ for normalized (0-1) coordinates, or (4) use *x* for plot
178
+ coordinates (inches, cm, etc.). All but *x* requires both *region*
179
+ and *projection* to be specified. Append +w followed by the length
180
+ and width of the color bar. If width is not specified then it is
181
+ set to 4% of the given length. Give a negative length to reverse
182
+ the scale bar. Append +h to get a horizontal scale
183
+ [Default is vertical (+v)]. By default, the anchor point on the
184
+ scale is assumed to be the bottom left corner (BL), but this can be
185
+ changed by appending +j followed by a 2-char justification code
186
+ *justify*.
187
+ box : bool or str
186
188
``[+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]]
187
189
[+s[[dx/dy/][shade]]]``. If set to True, draws a rectangular
188
190
border around the color scale. Alternatively, specify a different
@@ -198,12 +200,12 @@ def colorbar(self, **kwargs):
198
200
offset background shaded region. Here, dx/dy indicates the shift
199
201
relative to the foreground frame [4p/-4p] and shade sets the fill
200
202
style to use for shading [gray50].
201
- truncate (G) : list or str
203
+ truncate : list or str
202
204
``zlo/zhi`` Truncate the incoming CPT so that the lowest and
203
205
highest z-levels are to zlo and zhi. If one of these equal NaN then
204
206
we leave that end of the CPT alone. The truncation takes place
205
207
before the plotting.
206
- scale (W) : float
208
+ scale : float
207
209
Multiply all z-values in the CPT by the provided scale. By default
208
210
the CPT is used as is.
209
211
@@ -223,7 +225,7 @@ def colorbar(self, **kwargs):
223
225
Q = "cut" ,
224
226
R = "region" ,
225
227
S = "resample" ,
226
- U = "logo " ,
228
+ U = "timestamp " ,
227
229
W = "pen" ,
228
230
)
229
231
@kwargs_to_strings (R = "sequence" , L = "sequence" , A = "sequence_plus" )
@@ -241,7 +243,7 @@ def grdcontour(self, grid, **kwargs):
241
243
----------
242
244
grid : str or xarray.DataArray
243
245
The file name of the input grid or the grid loaded as a DataArray.
244
- C : str or int
246
+ interval : str or int
245
247
Specify the contour lines to generate.
246
248
247
249
- The filename of a `CPT` file where the color boundaries will
@@ -251,7 +253,7 @@ def grdcontour(self, grid, **kwargs):
251
253
angle (col 3)
252
254
- A fixed contour interval ``cont_int`` or a single contour with
253
255
``+[cont_int]``
254
- A : str, int, or list
256
+ annotation : str, int, or list
255
257
Specify or disable annotated contour levels, modifies annotated
256
258
contours specified in ``-C``.
257
259
@@ -261,17 +263,18 @@ def grdcontour(self, grid, **kwargs):
261
263
- Optional label modifiers can be specified as a single string
262
264
``'[annot_int]+e'`` or with a list of options
263
265
``([annot_int], 'e', 'f10p', 'gred')``.
264
- L : str or list of 2 ints
266
+ limit : str or list of 2 ints
265
267
Do no draw contours below `low` or above `high`, specify as string
266
268
``'[low]/[high]'`` or list ``[low,high]``.
267
- Q : string or int
269
+ cut : str or int
268
270
Do not draw contours with less than `cut` number of points.
269
- S : string or int
271
+ resample : str or int
270
272
Resample smoothing factor.
271
273
{J}
272
274
{R}
273
275
{B}
274
276
{G}
277
+ {U}
275
278
{W}
276
279
"""
277
280
kwargs = self ._preprocess (** kwargs )
@@ -439,6 +442,7 @@ def grdview(self, grid, **kwargs):
439
442
i = "columns" ,
440
443
l = "label" ,
441
444
C = "cmap" ,
445
+ U = "timestamp" ,
442
446
)
443
447
@kwargs_to_strings (R = "sequence" , i = "sequence_comma" )
444
448
def plot (self , x = None , y = None , data = None , sizes = None , direction = None , ** kwargs ):
@@ -471,7 +475,7 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
471
475
472
476
Parameters
473
477
----------
474
- x, y : float or 1d arrays
478
+ x/ y : float or 1d arrays
475
479
The x and y coordinates, or arrays of x and y coordinates of the
476
480
data points
477
481
data : str or 2d array
@@ -501,12 +505,12 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
501
505
``'[x|y|X|Y][+a][+cl|f][+n][+wcap][+ppen]'``.
502
506
Draw symmetrical error bars.
503
507
{G}
504
- S : str
508
+ style : str
505
509
Plot symbols (including vectors, pie slices, fronts, decorated or
506
510
quoted lines).
507
511
{W}
508
512
{U}
509
- l : str
513
+ label : str
510
514
Add a legend entry for the symbol or line being plotted.
511
515
"""
512
516
kwargs = self ._preprocess (** kwargs )
@@ -575,7 +579,7 @@ def contour(self, x=None, y=None, z=None, data=None, **kwargs):
575
579
576
580
Parameters
577
581
----------
578
- x, y, z : 1d arrays
582
+ x/y/ z : 1d arrays
579
583
Arrays of x and y coordinates and values z of the data points.
580
584
data : str or 2d array
581
585
Either a data file name or a 2d numpy array with the tabular data.
@@ -586,21 +590,26 @@ def contour(self, x=None, y=None, z=None, data=None, **kwargs):
586
590
By default, geographic line segments are drawn as great circle
587
591
arcs. To draw them as straight lines, use *A*.
588
592
{B}
589
- C : Contour file or level(s)
590
- D : Dump contour coordinates
591
- E : Network information
592
- G : Placement of labels
593
- I : Color the triangles using CPT
594
- L : Pen to draw the underlying triangulation (default none)
595
- N : Do not clip contours
596
- Q : Minimum contour length
597
- ``'[p|t]'``
598
- S : Skip input points outside region
599
- ``'[p|t]'``
593
+ levels : str
594
+ Contour file or level(s)
595
+ D : str
596
+ Dump contour coordinates
597
+ E : str
598
+ Network information
599
+ label_placement : str
600
+ Placement of labels
601
+ I : bool
602
+ Color the triangles using CPT
603
+ triangular_mesh_pen : str
604
+ Pen to draw the underlying triangulation (default none)
605
+ N : bool
606
+ Do not clip contours
607
+ Q : float or str
608
+ Do not draw contours with less than cut number of points.
609
+ ``'[cut[unit]][+z]'``
610
+ skip : bool or str
611
+ Skip input points outside region ``'[p|t]'``
600
612
{W}
601
- X : Origin shift x
602
- Y : Origin shift y
603
-
604
613
605
614
"""
606
615
kwargs = self ._preprocess (** kwargs )
@@ -623,7 +632,15 @@ def contour(self, x=None, y=None, z=None, data=None, **kwargs):
623
632
lib .call_module ("contour" , arg_str )
624
633
625
634
@fmt_docstring
626
- @use_alias (R = "region" , J = "projection" , B = "frame" )
635
+ @use_alias (
636
+ R = "region" ,
637
+ J = "projection" ,
638
+ B = "frame" ,
639
+ L = "map_scale" ,
640
+ Td = "rose" ,
641
+ Tm = "compass" ,
642
+ U = "timestamp" ,
643
+ )
627
644
@kwargs_to_strings (R = "sequence" )
628
645
def basemap (self , ** kwargs ):
629
646
"""
@@ -634,7 +651,8 @@ def basemap(self, **kwargs):
634
651
[optionally] gridlines. A simple map scale or directional rose may also
635
652
be plotted.
636
653
637
- At least one of the options *B*, *L*, or *T* must be specified.
654
+ At least one of the options *frame*, *map_scale*, *rose* or *compass*
655
+ must be specified.
638
656
639
657
Full option list at :gmt-docs:`basemap.html`
640
658
@@ -645,13 +663,13 @@ def basemap(self, **kwargs):
645
663
{J}
646
664
{R}
647
665
{B}
648
- L : str
666
+ map_scale : str
649
667
``'[g|j|J|n|x]refpoint'``
650
668
Draws a simple map scale centered on the reference point specified.
651
- Td : str
669
+ rose : str
652
670
Draws a map directional rose on the map at the location defined by
653
671
the reference and anchor points.
654
- Tm : str
672
+ compass : str
655
673
Draws a map magnetic rose on the map at the location defined by the
656
674
reference and anchor points
657
675
{U}
@@ -664,7 +682,7 @@ def basemap(self, **kwargs):
664
682
lib .call_module ("basemap" , build_arg_string (kwargs ))
665
683
666
684
@fmt_docstring
667
- @use_alias (R = "region" , J = "projection" )
685
+ @use_alias (R = "region" , J = "projection" , U = "timestamp" , D = "position" , F = "box" )
668
686
@kwargs_to_strings (R = "sequence" )
669
687
def logo (self , ** kwargs ):
670
688
"""
@@ -683,10 +701,10 @@ def logo(self, **kwargs):
683
701
----------
684
702
{J}
685
703
{R}
686
- D : str
704
+ position : str
687
705
``'[g|j|J|n|x]refpoint+wwidth[+jjustify][+odx[/dy]]'``.
688
706
Sets reference point on the map for the image.
689
- F : bool or str
707
+ box : bool or str
690
708
Without further options, draws a rectangular border around the
691
709
GMT logo.
692
710
{U}
@@ -699,7 +717,7 @@ def logo(self, **kwargs):
699
717
lib .call_module ("logo" , build_arg_string (kwargs ))
700
718
701
719
@fmt_docstring
702
- @use_alias (R = "region" , J = "projection" )
720
+ @use_alias (R = "region" , J = "projection" , D = "position" , F = "box" , M = "monochrome" )
703
721
@kwargs_to_strings (R = "sequence" )
704
722
def image (self , imagefile , ** kwargs ):
705
723
"""
@@ -714,17 +732,23 @@ def image(self, imagefile, **kwargs):
714
732
715
733
Parameters
716
734
----------
735
+ imagefile : str
736
+ This must be an Encapsulated PostScript (EPS) file or a raster
737
+ image. An EPS file must contain an appropriate BoundingBox. A
738
+ raster file can have a depth of 1, 8, 24, or 32 bits and is read
739
+ via GDAL. Note: If GDAL was not configured during GMT installation
740
+ then only EPS files are supported.
717
741
{J}
718
742
{R}
719
- D : str
743
+ position : str
720
744
``'[g|j|J|n|x]refpoint+rdpi+w[-]width[/height][+jjustify]
721
745
[+nnx[/ny]][+odx[/dy]]'`` Sets reference point on the map for the
722
746
image.
723
- F : bool or str
747
+ box : bool or str
724
748
``'[+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]]
725
749
[+s[[dx/dy/][shade]]]'`` Without further options, draws a
726
750
rectangular border around the image using **MAP_FRAME_PEN**.
727
- M : bool
751
+ monochrome : bool
728
752
Convert color image to monochrome grayshades using the (television)
729
753
YIQ-transformation.
730
754
"""
@@ -758,12 +782,12 @@ def legend(self, spec=None, position="JTR+jTR+o0.2c", box="+gwhite+p1p", **kwarg
758
782
specification file.
759
783
{J}
760
784
{R}
761
- position (D) : str
785
+ position : str
762
786
``'[g|j|J|n|x]refpoint+wwidth[/height][+jjustify][+lspacing]
763
787
[+odx[/dy]]'`` Defines the reference point on the map for the
764
788
legend. By default, uses 'JTR+jTR+o0.2c' which places the legend at
765
789
the top-right corner inside the map frame, with a 0.2 cm offset.
766
- box (F) : bool or str
790
+ box : bool or str
767
791
``'[+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]]
768
792
[+s[[dx/dy/][shade]]]'`` Without further options, draws a
769
793
rectangular border around the legend using **MAP_FRAME_PEN**. By
@@ -826,12 +850,12 @@ def text(
826
850
textfiles : str or list
827
851
A text data file name, or a list of filenames containing 1 or more
828
852
records with (x, y[, font, angle, justify], text).
829
- x, y : float or 1d arrays
853
+ x/ y : float or 1d arrays
830
854
The x and y coordinates, or an array of x and y coordinates to plot
831
855
the text
832
856
text : str or 1d array
833
857
The text string, or an array of strings to plot on the figure
834
- angle: int/ float or bool
858
+ angle: int, float or bool
835
859
Set the angle measured in degrees counter-clockwise from
836
860
horizontal. E.g. 30 sets the text at 30 degrees. If no angle is
837
861
given then the input textfile(s) must have this as a column.
0 commit comments