@@ -606,47 +606,49 @@ def grdview(self, grid, **kwargs):
606
606
607
607
@fmt_docstring
608
608
@use_alias (
609
- R = "region" ,
610
- J = "projection" ,
609
+ A = "straight_lines" ,
611
610
B = "frame" ,
612
- S = "style" ,
611
+ C = "cmap" ,
612
+ D = "position" ,
613
+ E = "error_bars" ,
613
614
G = "color" ,
615
+ J = "projection" ,
616
+ L = "close" ,
614
617
N = "no_clip" ,
615
- W = "pen" ,
616
- i = "columns" ,
617
- l = "label" ,
618
- C = "cmap" ,
618
+ R = "region" ,
619
+ S = "style" ,
619
620
U = "timestamp" ,
620
621
V = "verbose" ,
622
+ W = "pen" ,
621
623
X = "xshift" ,
622
624
Y = "yshift" ,
625
+ i = "columns" ,
626
+ l = "label" ,
623
627
p = "perspective" ,
624
628
t = "transparency" ,
625
629
)
626
630
@kwargs_to_strings (R = "sequence" , i = "sequence_comma" , p = "sequence" )
627
631
def plot (self , x = None , y = None , data = None , sizes = None , direction = None , ** kwargs ):
628
632
"""
629
- Plot lines, polygons, and symbols on maps.
630
-
631
- Used to be psxy.
633
+ Plot lines, polygons, and symbols in 2-D.
632
634
633
635
Takes a matrix, (x,y) pairs, or a file name as input and plots lines,
634
636
polygons, or symbols at those locations on a map.
635
637
636
638
Must provide either *data* or *x* and *y*.
637
639
638
- If providing data through *x* and *y*, *color* (G) can be a 1d array
639
- that will be mapped to a colormap.
640
+ If providing data through *x* and *y*, *color* can be a 1d array that
641
+ will be mapped to a colormap.
640
642
641
- If a symbol is selected and no symbol size given, then psxy will
643
+ If a symbol is selected and no symbol size given, then plot will
642
644
interpret the third column of the input data as symbol size. Symbols
643
645
whose size is <= 0 are skipped. If no symbols are specified then the
644
- symbol code (see *S * below) must be present as last column in the
645
- input. If *S * is not used, a line connecting the data points will be
646
- drawn instead. To explicitly close polygons, use *L *. Select a fill
647
- with *G *. If *G * is set, *W * will control whether the polygon outline
648
- is drawn or not. If a symbol is selected, *G * and *W* determines the
649
- fill and outline/no outline, respectively.
646
+ symbol code (see *symbol * below) must be present as last column in the
647
+ input. If *symbol * is not used, a line connecting the data points will
648
+ be drawn instead. To explicitly close polygons, use *close *. Select a
649
+ fill with *color *. If *color * is set, *pen * will control whether the
650
+ polygon outline is drawn or not. If a symbol is selected, *color * and
651
+ *pen* determines the fill and outline/no outline, respectively.
650
652
651
653
Full option list at :gmt-docs:`plot.html`
652
654
@@ -671,19 +673,33 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
671
673
depending on the style options chosen.
672
674
{J}
673
675
{R}
674
- A : bool or str
675
- ``' [m|p|x|y]'``
676
+ straight_lines : bool or str
677
+ ``[m|p|x|y]``.
676
678
By default, geographic line segments are drawn as great circle
677
- arcs. To draw them as straight lines, use *A*.
679
+ arcs. To draw them as straight lines, use *straight_lines*.
680
+ Alternatively, add **m** to draw the line by first following a
681
+ meridian, then a parallel. Or append **p** to start following a
682
+ parallel, then a meridian. (This can be practical to draw a line
683
+ along parallels, for example). For Cartesian data, points are
684
+ simply connected, unless you append **x** or **y** to draw
685
+ stair-case curves that whose first move is along *x* or *y*,
686
+ respectively.
678
687
{B}
679
688
{CPT}
680
- D : str
681
- ``'dx/dy'``: Offset the plot symbol or line locations by the given
682
- amounts dx/dy.
683
- E : bool or str
684
- ``'[x|y|X|Y][+a][+cl|f][+n][+wcap][+ppen]'``.
685
- Draw symmetrical error bars.
689
+ position : str
690
+ ``dx/dy``.
691
+ Offset the plot symbol or line locations by the given amounts
692
+ *dx/dy* [Default is no offset]. If *dy* is not given it is set
693
+ equal to *dx*.
694
+ error_bars : bool or str
695
+ ``[x|y|X|Y][+a][+cl|f][+n][+wcap][+ppen]``.
696
+ Draw symmetrical error bars. Full documentation is at
697
+ :gmt-docs:`plot.html#e`.
686
698
{G}
699
+ close : str
700
+ ``[+b|d|D][+xl|r|x0][+yl|r|y0][+ppen]``.
701
+ Force closed polygons. Full documentation is at
702
+ :gmt-docs:`plot.html#l`.
687
703
no_clip : bool or str
688
704
``'[c|r]'``.
689
705
Do NOT clip symbols that fall outside map border [Default plots
0 commit comments