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 1 commit
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
26 changes: 24 additions & 2 deletions pygmt/base_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,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 @@ -674,6 +675,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]'``
seisman marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -738,6 +751,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 @@ -787,8 +801,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 @@ -1067,6 +1082,7 @@ def legend(self, spec=None, position="JTR+jTR+o0.2c", box="+gwhite+p1p", **kwarg
C="clearance",
D="offset",
G="fill",
N="no_clip",
W="pen",
X="xshift",
Y="yshift",
Expand Down Expand Up @@ -1178,6 +1194,8 @@ 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 will clip].
seisman marked this conversation as resolved.
Show resolved Hide resolved
{XY}
{p}
{t}
Expand Down Expand Up @@ -1235,6 +1253,7 @@ def text(
J="projection",
B="frame",
C="offset",
N="no_clip",
X="xshift",
Y="yshift",
p="perspective",
Expand Down Expand Up @@ -1332,6 +1351,9 @@ 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 plots symbols inside frame only].
seisman marked this conversation as resolved.
Show resolved Hide resolved
{J}
{R}
{B}
Expand Down