Skip to content

Commit c566148

Browse files
committed
Alias connection (F), intensity (I) and zvalue (Z) for plot
1 parent 0f60edf commit c566148

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

pygmt/base_plotting.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,9 @@ def grdview(self, grid, **kwargs):
611611
C="cmap",
612612
D="offset",
613613
E="error_bars",
614+
F="connection",
614615
G="color",
616+
I="intensity",
615617
J="projection",
616618
L="close",
617619
N="no_clip",
@@ -622,6 +624,7 @@ def grdview(self, grid, **kwargs):
622624
W="pen",
623625
X="xshift",
624626
Y="yshift",
627+
Z="zvalue",
625628
i="columns",
626629
l="label",
627630
p="perspective",
@@ -696,7 +699,43 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
696699
``[x|y|X|Y][+a][+cl|f][+n][+wcap][+ppen]``.
697700
Draw symmetrical error bars. Full documentation is at
698701
:gmt-docs:`plot.html#e`.
702+
connection : str
703+
``[c|n|r][a|f|s|r|refpoint]``.
704+
Alter the way points are connected (by specifying a *scheme*) and
705+
data are grouped (by specifying a *method*). Append one of three
706+
line connection schemes:
707+
708+
- **c**\ : Draw continuous line segments for each group [Default].
709+
- **r**\ : Draw line segments from a reference point reset for each
710+
group.
711+
- **n**\ : Draw networks of line segments between all points in
712+
each group.
713+
714+
Optionally, append the one of four segmentation methods to define
715+
the group:
716+
717+
- **a**\ : Ignore all segment headers, i.e., let all points belong
718+
to a single group, and set group reference point to the very
719+
first point of the first file.
720+
- **f**\ : Consider all data in each file to be a single separate
721+
group and reset the group reference point to the first point of
722+
each group.
723+
- **s**\ : Segment headers are honored so each segment is a group;
724+
the group reference point is reset to the first point of each
725+
incoming segment [Default].
726+
- **r**\ : Same as **s**, but the group reference point is reset
727+
after each record to the previous point (this method is only
728+
available with the ``connection='r'`` scheme).
729+
730+
Instead of the codes **a**\|\ **f**\|\ **s**\|\ **r** you may
731+
append the coordinates of a *refpoint* which will serve as a fixed
732+
external reference point for all groups.
699733
{G}
734+
intensity : float or bool
735+
Provide an *intens* value (nominally in the -1 to +1 range) to
736+
modulate the fill color by simulating illumination [None]. If
737+
using ``intensity=True``, we will instead read *intens* from the
738+
first data column after the symbol parameters (if given).
700739
close : str
701740
``[+b|d|D][+xl|r|x0][+yl|r|y0][+ppen]``.
702741
Force closed polygons. Full documentation is at
@@ -720,6 +759,15 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
720759
{U}
721760
{V}
722761
{XY}
762+
zvalue : str
763+
``value|file``.
764+
Instead of specifying a symbol or polygon fill and outline color
765+
via **color** and **pen**, give both a *value* via **zvalue** and a
766+
color lookup table via **cmap**. Alternatively, give the name of a
767+
*file* with one z-value (read from the last column) for each
768+
polygon in the input data. To apply it to the fill color, use
769+
``color='+z'``. To apply it to the pen color, append **+z** to
770+
**pen**.
723771
label : str
724772
Add a legend entry for the symbol or line being plotted.
725773

0 commit comments

Comments
 (0)