Skip to content

Commit ab38222

Browse files
scottshambaughkyracho
authored andcommitted
Fix docs
Implement dynamic clipping to axes box for 3D plots Make axlim_clip flag keyword only Updates test image test image restore Implement dynamic clipping to axes box for 3D plots Make axlim_clip flag keyword only Updates test image test image restore Implement dynamic clipping to axes box for 3D plots Make axlim_clip flag keyword only Updates test image test image restore Code review comments on 3D axlim clipping Code review comments on 3D axlim clipping
1 parent 32722d9 commit ab38222

File tree

4 files changed

+43
-5
lines changed

4 files changed

+43
-5
lines changed

doc/missing-references.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@
328328
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:212",
329329
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Quiver:251",
330330
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Path3DCollection.set:46",
331-
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Poly3DCollection.set:44"
331+
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Poly3DCollection.set:45"
332332
],
333333
"matplotlib.collections._MeshData.set_array": [
334334
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolormesh:164",

doc/users/next_whats_new/3d_clip_to_axis_limits.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ will clip the data to the axes view limits, hiding all data outside those
66
bounds. This clipping will be dynamically applied in real time while panning
77
and zooming.
88

9-
Please note that if one vertex of a line segment or 3D patch is clipped, the
10-
entire segment or patch will be hidden. Not being able to show partial lines
11-
or patches such that they are "smoothly" cut off at the boundaries of the view
12-
box is a limitation of the current renderer.
9+
Please note that if one vertex of a line segment or 3D patch is clipped, then
10+
the entire segment or patch will be hidden. Not being able to show partial
11+
lines or patches such that they are "smoothly" cut off at the boundaries of the
12+
view box is a limitation of the current renderer.
1313

1414
.. plot::
1515
:include-source: true

galleries/users_explain/toolkits/mplot3d.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ See `.Axes3D.fill_between` for API documentation.
121121
:target: /gallery/mplot3d/fillbetween3d.html
122122
:align: center
123123

124+
.. versionadded:: 3.10
125+
124126
.. _polygon3d:
125127

126128
Polygon plots

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,8 @@ def text(self, x, y, z, s, zdir=None, *, axlim_clip=False, **kwargs):
19031903
See `.get_dir_vector` for a description of the values.
19041904
axlim_clip : bool, default: False
19051905
Whether to hide text that is outside the axes view limits.
1906+
1907+
.. versionadded:: 3.10
19061908
**kwargs
19071909
Other arguments are forwarded to `matplotlib.axes.Axes.text`.
19081910
@@ -1935,6 +1937,8 @@ def plot(self, xs, ys, *args, zdir='z', axlim_clip=False, **kwargs):
19351937
When plotting 2D data, the direction to use as z.
19361938
axlim_clip : bool, default: False
19371939
Whether to hide data that is outside the axes view limits.
1940+
1941+
.. versionadded:: 3.10
19381942
**kwargs
19391943
Other arguments are forwarded to `matplotlib.axes.Axes.plot`.
19401944
"""
@@ -2013,6 +2017,8 @@ def fill_between(self, x1, y1, z1, x2, y2, z2, *,
20132017
axlim_clip : bool, default: False
20142018
Whether to hide data that is outside the axes view limits.
20152019
2020+
.. versionadded:: 3.10
2021+
20162022
**kwargs
20172023
All other keyword arguments are passed on to `.Poly3DCollection`.
20182024
@@ -2158,6 +2164,8 @@ def plot_surface(self, X, Y, Z, *, norm=None, vmin=None,
21582164
axlim_clip : bool, default: False
21592165
Whether to hide patches with a vertex outside the axes view limits.
21602166
2167+
.. versionadded:: 3.10
2168+
21612169
**kwargs
21622170
Other keyword arguments are forwarded to `.Poly3DCollection`.
21632171
"""
@@ -2306,6 +2314,8 @@ def plot_wireframe(self, X, Y, Z, *, axlim_clip=False, **kwargs):
23062314
Whether to hide lines and patches with vertices outside the axes
23072315
view limits.
23082316
2317+
.. versionadded:: 3.10
2318+
23092319
rcount, ccount : int
23102320
Maximum number of samples used in each direction. If the input
23112321
data is larger, it will be downsampled (by slicing) to these
@@ -2453,6 +2463,8 @@ def plot_trisurf(self, *args, color=None, norm=None, vmin=None, vmax=None,
24532463
The lightsource to use when *shade* is True.
24542464
axlim_clip : bool, default: False
24552465
Whether to hide patches with a vertex outside the axes view limits.
2466+
2467+
.. versionadded:: 3.10
24562468
**kwargs
24572469
All other keyword arguments are passed on to
24582470
:class:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
@@ -2596,6 +2608,8 @@ def contour(self, X, Y, Z, *args,
25962608
position in a plane normal to *zdir*.
25972609
axlim_clip : bool, default: False
25982610
Whether to hide lines with a vertex outside the axes view limits.
2611+
2612+
.. versionadded:: 3.10
25992613
data : indexable object, optional
26002614
DATA_PARAMETER_PLACEHOLDER
26012615
@@ -2643,6 +2657,8 @@ def tricontour(self, *args,
26432657
position in a plane normal to *zdir*.
26442658
axlim_clip : bool, default: False
26452659
Whether to hide lines with a vertex outside the axes view limits.
2660+
2661+
.. versionadded:: 3.10
26462662
data : indexable object, optional
26472663
DATA_PARAMETER_PLACEHOLDER
26482664
*args, **kwargs
@@ -2700,6 +2716,8 @@ def contourf(self, X, Y, Z, *args,
27002716
position in a plane normal to *zdir*.
27012717
axlim_clip : bool, default: False
27022718
Whether to hide lines with a vertex outside the axes view limits.
2719+
2720+
.. versionadded:: 3.10
27032721
data : indexable object, optional
27042722
DATA_PARAMETER_PLACEHOLDER
27052723
*args, **kwargs
@@ -2740,6 +2758,8 @@ def tricontourf(self, *args, zdir='z', offset=None, axlim_clip=False, **kwargs):
27402758
position in a plane normal to zdir.
27412759
axlim_clip : bool, default: False
27422760
Whether to hide lines with a vertex outside the axes view limits.
2761+
2762+
.. versionadded:: 3.10
27432763
data : indexable object, optional
27442764
DATA_PARAMETER_PLACEHOLDER
27452765
*args, **kwargs
@@ -2798,6 +2818,8 @@ def add_collection3d(self, col, zs=0, zdir='z', autolim=True, *,
27982818
Whether to update the data limits.
27992819
axlim_clip : bool, default: False
28002820
Whether to hide the scatter points outside the axes view limits.
2821+
2822+
.. versionadded:: 3.10
28012823
"""
28022824
had_data = self.has_data()
28032825

@@ -2879,6 +2901,8 @@ def scatter(self, xs, ys,
28792901
independently.
28802902
axlim_clip : bool, default: False
28812903
Whether to hide the scatter points outside the axes view limits.
2904+
2905+
.. versionadded:: 3.10
28822906
data : indexable object, optional
28832907
DATA_PARAMETER_PLACEHOLDER
28842908
**kwargs
@@ -2938,6 +2962,8 @@ def bar(self, left, height, zs=0, zdir='z', *args,
29382962
When plotting 2D data, the direction to use as z ('x', 'y' or 'z').
29392963
axlim_clip : bool, default: False
29402964
Whether to hide bars with points outside the axes view limits.
2965+
2966+
.. versionadded:: 3.10
29412967
data : indexable object, optional
29422968
DATA_PARAMETER_PLACEHOLDER
29432969
**kwargs
@@ -3030,6 +3056,8 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
30303056
axlim_clip : bool, default: False
30313057
Whether to hide the bars with points outside the axes view limits.
30323058
3059+
.. versionadded:: 3.10
3060+
30333061
data : indexable object, optional
30343062
DATA_PARAMETER_PLACEHOLDER
30353063
@@ -3188,6 +3216,8 @@ def quiver(self, X, Y, Z, U, V, W, *,
31883216
axlim_clip : bool, default: False
31893217
Whether to hide arrows with points outside the axes view limits.
31903218
3219+
.. versionadded:: 3.10
3220+
31913221
data : indexable object, optional
31923222
DATA_PARAMETER_PLACEHOLDER
31933223
@@ -3329,6 +3359,8 @@ def voxels(self, *args, facecolors=None, edgecolors=None, shade=True,
33293359
axlim_clip : bool, default: False
33303360
Whether to hide voxels with points outside the axes view limits.
33313361
3362+
.. versionadded:: 3.10
3363+
33323364
**kwargs
33333365
Additional keyword arguments to pass onto
33343366
`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`.
@@ -3577,6 +3609,8 @@ def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='',
35773609
axlim_clip : bool, default: False
35783610
Whether to hide error bars that are outside the axes limits.
35793611
3612+
.. versionadded:: 3.10
3613+
35803614
Returns
35813615
-------
35823616
errlines : list
@@ -3893,6 +3927,8 @@ def stem(self, x, y, z, *, linefmt='C0-', markerfmt='C0o', basefmt='C3-',
38933927
axlim_clip : bool, default: False
38943928
Whether to hide stems that are outside the axes limits.
38953929
3930+
.. versionadded:: 3.10
3931+
38963932
data : indexable object, optional
38973933
DATA_PARAMETER_PLACEHOLDER
38983934

0 commit comments

Comments
 (0)