Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "no_clip" to plot, text, contour and meca #661

Merged
merged 4 commits into from
Oct 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions pygmt/base_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ def grdview(self, grid, **kwargs):
B="frame",
S="style",
G="color",
N="no_clip",
W="pen",
i="columns",
l="label",
Expand Down Expand Up @@ -683,6 +684,18 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
``'[x|y|X|Y][+a][+cl|f][+n][+wcap][+ppen]'``.
Draw symmetrical error bars.
{G}
no_clip : bool or str
``'[c|r]'``.
Do NOT clip symbols that fall outside map border [Default plots
points whose coordinates are strictly inside the map border only].
The option does not apply to lines and polygons which are always
clipped to the map region. For periodic (360-longitude) maps we
must plot all symbols twice in case they are clipped by the
repeating boundary. ``no_clip=True`` will turn off clipping and not
plot repeating symbols. Use ``no_clip="r"`` to turn off clipping
but retain the plotting of such repeating symbols, or use
``no_clip="c"`` to retain clipping but turn off plotting of
repeating symbols.
style : str
Plot symbols (including vectors, pie slices, fronts, decorated or
quoted lines).
Expand Down Expand Up @@ -748,6 +761,7 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
G="label_placement",
W="pen",
L="triangular_mesh_pen",
N="no_clip",
i="columns",
l="label",
C="levels",
Expand Down Expand Up @@ -798,8 +812,9 @@ def contour(self, x=None, y=None, z=None, data=None, **kwargs):
Color the triangles using CPT
triangular_mesh_pen : str
Pen to draw the underlying triangulation (default none)
N : bool
Do not clip contours
no_clip : bool
Do NOT clip contours or image at the boundaries [Default will clip
to fit inside region].
Q : float or str
Do not draw contours with less than cut number of points.
``'[cut[unit]][+z]'``
Expand Down Expand Up @@ -1085,6 +1100,7 @@ def legend(self, spec=None, position="JTR+jTR+o0.2c", box="+gwhite+p1p", **kwarg
C="clearance",
D="offset",
G="fill",
N="no_clip",
V="verbose",
W="pen",
X="xshift",
Expand Down Expand Up @@ -1197,6 +1213,9 @@ def text(
Sets the pen used to draw a rectangle around the text string
(see *clearance*) [Default is width = default, color = black,
style = solid].
no_clip : bool
Do NOT clip text at map boundaries [Default is False, i.e. will
clip].
{V}
{XY}
{p}
Expand Down Expand Up @@ -1255,6 +1274,7 @@ def text(
J="projection",
B="frame",
C="offset",
N="no_clip",
V="verbose",
X="xshift",
Y="yshift",
Expand Down Expand Up @@ -1353,6 +1373,10 @@ def meca(
circle is plotted at the initial location and a line connects
the beachball to the circle. Specify pen and optionally append
``+ssize`` to change the line style and/or size of the circle.
no_clip : bool
Does NOT skip symbols that fall outside frame boundary specified by
*region* [Default is False, i.e. plot symbols inside map frame
only].
{J}
{R}
{B}
Expand Down