Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit73b3b08

Browse files
versionadded indicators
1 parent2d73765 commit73b3b08

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

‎doc/users/next_whats_new/depthshading_improvement.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ controlled via rcParams, with values of ``True`` and ``0.3`` respectively.
1616
A simple example:
1717

1818
..plot::
19+
:include-source: true
20+
:alt: A 3D scatter plot with depth-shading enabled.
21+
1922
import matplotlib.pyplot as plt
2023

2124
fig = plt.figure()

‎lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ class Text3D(mtext.Text):
113113
axlim_clip : bool, default: False
114114
Whether to hide text outside the axes view limits.
115115
116+
.. versionadded:: 3.10
117+
116118
Other Parameters
117119
----------------
118120
**kwargs
@@ -169,6 +171,8 @@ def set_3d_properties(self, z=0, zdir='z', axlim_clip=False):
169171
See `.get_dir_vector` for a description of the values.
170172
axlim_clip : bool, default: False
171173
Whether to hide text outside the axes view limits.
174+
175+
.. versionadded:: 3.10
172176
"""
173177
self._z=z
174178
self._dir_vec=get_dir_vector(zdir)
@@ -212,6 +216,8 @@ def text_2d_to_3d(obj, z=0, zdir='z', axlim_clip=False):
212216
See `.get_dir_vector` for a description of the values.
213217
axlim_clip : bool, default: False
214218
Whether to hide text outside the axes view limits.
219+
220+
.. versionadded:: 3.10
215221
"""
216222
obj.__class__=Text3D
217223
obj.set_3d_properties(z,zdir,axlim_clip)
@@ -260,6 +266,8 @@ def set_3d_properties(self, zs=0, zdir='z', axlim_clip=False):
260266
See `.get_dir_vector` for a description of the values.
261267
axlim_clip : bool, default: False
262268
Whether to hide lines with an endpoint outside the axes view limits.
269+
270+
.. versionadded:: 3.10
263271
"""
264272
xs=self.get_xdata()
265273
ys=self.get_ydata()
@@ -337,6 +345,8 @@ def line_2d_to_3d(line, zs=0, zdir='z', axlim_clip=False):
337345
See `.get_dir_vector` for a description of the values.
338346
axlim_clip : bool, default: False
339347
Whether to hide lines with an endpoint outside the axes view limits.
348+
349+
.. versionadded:: 3.10
340350
"""
341351

342352
line.__class__=Line3D
@@ -506,6 +516,8 @@ def __init__(self, *args, zs=(), zdir='z', axlim_clip=False, **kwargs):
506516
See `.get_dir_vector` for a description of the values.
507517
axlim_clip : bool, default: False
508518
Whether to hide patches with a vertex outside the axes view limits.
519+
520+
.. versionadded:: 3.10
509521
"""
510522
super().__init__(*args,**kwargs)
511523
self.set_3d_properties(zs,zdir,axlim_clip)
@@ -525,6 +537,8 @@ def set_3d_properties(self, verts, zs=0, zdir='z', axlim_clip=False):
525537
See `.get_dir_vector` for a description of the values.
526538
axlim_clip : bool, default: False
527539
Whether to hide patches with a vertex outside the axes view limits.
540+
541+
.. versionadded:: 3.10
528542
"""
529543
zs=np.broadcast_to(zs,len(verts))
530544
self._segment3d= [juggle_axes(x,y,z,zdir)
@@ -572,6 +586,8 @@ def __init__(self, path, *, zs=(), zdir='z', axlim_clip=False, **kwargs):
572586
See `.get_dir_vector` for a description of the values.
573587
axlim_clip : bool, default: False
574588
Whether to hide path patches with a point outside the axes view limits.
589+
590+
.. versionadded:: 3.10
575591
"""
576592
# Not super().__init__!
577593
Patch.__init__(self,**kwargs)
@@ -592,6 +608,8 @@ def set_3d_properties(self, path, zs=0, zdir='z', axlim_clip=False):
592608
See `.get_dir_vector` for a description of the values.
593609
axlim_clip : bool, default: False
594610
Whether to hide path patches with a point outside the axes view limits.
611+
612+
.. versionadded:: 3.10
595613
"""
596614
Patch3D.set_3d_properties(self,path.vertices,zs=zs,zdir=zdir,
597615
axlim_clip=axlim_clip)
@@ -698,6 +716,8 @@ def set_depthshade(
698716
depthshade_minalpha : float, default: None
699717
Sets the minimum alpha value used by depth-shading.
700718
If None, use the value from rcParams['axes3d.depthshade_minalpha'].
719+
720+
.. versionadded:: 3.11
701721
"""
702722
ifdepthshade_minalphaisNone:
703723
depthshade_minalpha=rcParams['axes3d.depthshade_minalpha']
@@ -725,6 +745,8 @@ def set_3d_properties(self, zs, zdir, axlim_clip=False):
725745
See `.get_dir_vector` for a description of the values.
726746
axlim_clip : bool, default: False
727747
Whether to hide patches with a vertex outside the axes view limits.
748+
749+
.. versionadded:: 3.10
728750
"""
729751
# Force the collection to initialize the face and edgecolors
730752
# just in case it is a scalarmappable with a colormap.
@@ -879,6 +901,8 @@ def set_3d_properties(self, zs, zdir, axlim_clip=False):
879901
See `.get_dir_vector` for a description of the values.
880902
axlim_clip : bool, default: False
881903
Whether to hide paths with a vertex outside the axes view limits.
904+
905+
.. versionadded:: 3.10
882906
"""
883907
# Force the collection to initialize the face and edgecolors
884908
# just in case it is a scalarmappable with a colormap.
@@ -942,6 +966,8 @@ def set_depthshade(
942966
depth.
943967
depthshade_minalpha : float
944968
Sets the minimum alpha value used by depth-shading.
969+
970+
.. versionadded:: 3.11
945971
"""
946972
ifdepthshade_minalphaisNone:
947973
depthshade_minalpha=rcParams['axes3d.depthshade_minalpha']
@@ -1065,11 +1091,16 @@ def patch_collection_2d_to_3d(
10651091
depthshade : bool, default: None
10661092
Whether to shade the patches to give a sense of depth.
10671093
If None, use the value from rcParams['axes3d.depthshade'].
1094+
axlim_clip : bool, default: False
1095+
Whether to hide patches with a vertex outside the axes view limits.
1096+
1097+
.. versionadded:: 3.10
1098+
10681099
depthshade_minalpha : float, default: None
10691100
Sets the minimum alpha value used by depth-shading.
10701101
If None, use the value from rcParams['axes3d.depthshade_minalpha'].
1071-
axlim_clip : bool, default: False
1072-
Whether to hide patches with a vertex outside the axes view limits.
1102+
1103+
.. versionadded:: 3.11
10731104
"""
10741105
ifisinstance(col,PathCollection):
10751106
col.__class__=Path3DCollection
@@ -1133,6 +1164,8 @@ def __init__(self, verts, *args, zsort='average', shade=False,
11331164
axlim_clip : bool, default: False
11341165
Whether to hide polygons with a vertex outside the view limits.
11351166
1167+
.. versionadded:: 3.10
1168+
11361169
*args, **kwargs
11371170
All other parameters are forwarded to `.PolyCollection`.
11381171

‎lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2952,6 +2952,9 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=None,
29522952
depthshade_minalpha : float, default: None
29532953
The lowest alpha value applied by depth-shading.
29542954
If None, use the value from rcParams['axes3d.depthshade_minalpha'].
2955+
2956+
.. versionadded:: 3.11
2957+
29552958
axlim_clip : bool, default: False
29562959
Whether to hide the scatter points outside the axes view limits.
29572960

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp