8000 Fix docs · matplotlib/matplotlib@cc5e8d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit cc5e8d5

Browse files
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 01fada9 commit cc5e8d5

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
@@ -325,7 +325,7 @@
325325
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:212",
326326
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Quiver:251",
327327
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Path3DCollection.set:46",
328-
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Poly3DCollection.set:44"
328+
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Poly3DCollection.set:45"
329329
],
330330
"matplotlib.collections._MeshData.set_array": [
331331
"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
@@ -1902,6 +1902,8 @@ def text(self, x, y, z, s, zdir=None, *, axlim_clip=False, **kwargs):
19021902
See `.get_dir_vector` for a description of the values.
19031903
axlim_clip : bool, default: False
19041904
Whether to hide text that is outside the axes view limits.
1905+
1906+
.. versionadded:: 3.10
19051907
**kwargs
19061908
Other arguments are forwarded to `matplotlib.axes.Axes.text`.
19071909
@@ -1934,6 +1936,8 @@ def plot(self, xs, ys, *args, zdir='z', axlim_clip=False, **kwargs):
19341936
When plotting 2D data, the direction to use as z.
19351937
axlim_clip : bool, default: False
19361938
Whether to hide data that is outside the axes view limits.
1939+
1940+
.. versionadded:: 3.10
19371941
**kwargs
19381942
Other arguments are forwarded to `matplotlib.axes.Axes.plot`.
19391943
"""
@@ -2012,6 +2016,8 @@ def fill_between(self, x1, y1, z1, x2, y2, z2, *,
20122016
axlim_clip : bool, default: False
20132017
Whether to hide data that is outside the axes view limits.
20142018
2019+
.. versionadded:: 3.10
2020+
20152021
**kwargs
20162022
All other keyword arguments are passed on to `.Poly3DCollection`.
20172023
@@ -2157,6 +2163,8 @@ def plot_surface(self, X, Y, Z, *, norm=None, vmin=None,
21572163
axlim_clip : bool, default: False
21582164
Whether to hide patches with a vertex outside the axes view limits.
21592165
2166+
.. versionadded:: 3.10
2167+
21602168
**kwargs
21612169
Other keyword arguments are forwarded to `.Poly3DCollection`.
21622170
"""
@@ -2305,6 +2313,8 @@ def plot_wireframe(self, X, Y, Z, *, axlim_clip=False, **kwargs):
23052313
Whether to hide lines and patches with vertices outside the axes
23062314
view limits.
23072315
2316+
.. versionadded:: 3.10
2317+
23082318
rcount, ccount : int
23092319
Maximum number of samples used in each direction. If the input
23102320
data is larger, it will be downsampled (by slicing) to these
@@ -2452,6 +2462,8 @@ def plot_trisurf(self, *args, color=None, norm=None, vmin=None, vmax=None,
24522462
The lightsource to use when *shade* is True.
24532463
axlim_clip : bool, default: False
24542464
Whether to hide patches with a vertex outside the axes view limits.
2465+
2466+
.. versionadded:: 3.10
24552467
**kwargs
24562468
All other keyword arguments are passed on to
24572469
:class:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
@@ -2595,6 +2607,8 @@ def contour(self, X, Y, Z, *args,
25952607
position in a plane normal to *zdir*.
25962608
axlim_clip : bool, default: False
25972609
Whether to hide lines with a vertex outside the axes view limits.
2610+
2611+
.. versionadded:: 3.10
25982612
data : indexable object, optional
25992613
DATA_PARAMETER_PLACEHOLDER
26002614
@@ -2642,6 +2656,8 @@ def tricontour(self, *args,
26422656
position in a plane normal to *zdir*.
26432657
axlim_clip : bool, default: False
26442658
Whether to hide lines with a vertex outside the axes view limits.
2659+
2660+
.. versionadded:: 3.10
26452661
data : indexable object, optional
26462662
DATA_PARAMETER_PLACEHOLDER
26472663
*args, **kwargs
@@ -2699,6 +2715,8 @@ def contourf(self, X, Y, Z, *args,
26992715
position in a plane normal to *zdir*.
27002716
axlim_clip : bool, default: False
27012717
Whether to hide lines with a vertex outside the axes view limits.
2718+
2719+
.. versionadded:: 3.10
27022720
data : indexable object, optional
27032721
DATA_PARAMETER_PLACEHOLDER
27042722
*args, **kwargs
@@ -2739,6 +2757,8 @@ def tricontourf(self, *args, zdir='z', offset=None, axlim_clip=False, **kwargs):
27392757
position in a plane normal to zdir.
27402758
axlim_clip : bool, default: False
27412759
Whether to hide lines with a vertex outside the axes view limits.
2760+
2761+
.. versionadded:: 3.10
27422762
data : indexable object, optional
27432763
DATA_PARAMETER_PLACEHOLDER
27442764
*args, **kwargs
@@ -2797,6 +2817,8 @@ def add_collection3d(self, col, zs=0, zdir='z', autolim=True, *,
27972817
Whether to update the data limits.
27982818
axlim_clip : bool, default: False
27992819
Whether to hide the scatter points outside the axes view limits.
2820+
2821+
.. versionadded:: 3.10
28002822
"""
28012823
had_data = self.has_data()
28022824

@@ -2878,6 +2900,8 @@ def scatter(self, xs, ys,
28782900
independently.
28792901
axlim_clip : bool, default: False
28802902
Whether to hide the scatter points outside the axes view limits.
2903+
2904+
.. versionadded:: 3.10
28812905
data : indexable object, optional
28822906
DATA_PARAMETER_PLACEHOLDER
28832907
**kwargs
@@ -2937,6 +2961,8 @@ def bar(self, left, height, zs=0, zdir='z', *args,
29372961
When plotting 2D data, the direction to use as z ('x', 'y' or 'z').
29382962
axlim_clip : bool, default: False
29392963
Whether to hide bars with points outside the axes view limits.
2964+
2965+
.. versionadded:: 3.10
29402966
data : indexable object, optional
29412967
DATA_PARAMETER_PLACEHOLDER
29422968
**kwargs
@@ -3029,6 +3055,8 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
30293055
axlim_clip : bool, default: False
30303056
Whether to hide the bars with points outside the axes view limits.
30313057
3058+
.. versionadded:: 3.10
3059+
30323060
data : indexable object, optional
30333061
DATA_PARAMETER_PLACEHOLDER
30343062
@@ -3187,6 +3215,8 @@ def quiver(self, X, Y, Z, U, V, W, *,
31873215
axlim_clip : bool, default: False
31883216
Whether to hide arrows with points outside the axes view limits.
31893217
3218+
.. versionadded:: 3.10
3219+
31903220
data : indexable object, optional
31913221
DATA_PARAMETER_PLACEHOLDER
31923222
@@ -3328,6 +3358,8 @@ def voxels(self, *args, facecolors=None, edgecolors=None, shade=True,
33283358
axlim_clip : bool, default: False
33293359
Whether to hide voxels with points outside the axes view limits.
33303360
3361+
.. versionadded:: 3.10
3362+
33313363
**kwargs
33323364
Additional keyword arguments to pass onto
33333365
`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`.
@@ -3576,6 +3608,8 @@ def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='',
35763608
axlim_clip : bool, default: False
35773609
Whether to hide error bars that are outside the axes limits.
35783610
3611+
.. versionadded:: 3.10
3612+
35793613
Returns
35803614
-------
35813615
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)
0