Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ed53303

Browse files
committed
Added decorators to more methods in axes3d.py
1 parent 51438b2 commit ed53303

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,6 +2075,7 @@ def add_contourf_set(self, cset, zdir='z', offset=None):
20752075
art3d.poly_collection_2d_to_3d(linec, z, zdir=zdir)
20762076
linec.set_sort_zpos(z)
20772077

2078+
@_preprocess_data()
20782079
def contour(self, X, Y, Z, *args,
20792080
extend3d=False, stride=5, zdir='z', offset=None, **kwargs):
20802081
"""
@@ -2093,6 +2094,9 @@ def contour(self, X, Y, Z, *args,
20932094
offset : float, optional
20942095
If specified, plot a projection of the contour lines at this
20952096
position in a plane normal to zdir.
2097+
data : indexable object, optional
2098+
DATA_PARAMETER_PLACEHOLDER
2099+
20962100
*args, **kwargs
20972101
Other arguments are forwarded to `matplotlib.axes.Axes.contour`.
20982102
@@ -2111,6 +2115,7 @@ def contour(self, X, Y, Z, *args,
21112115

21122116
contour3D = contour
21132117

2118+
@_preprocess_data()
21142119
def tricontour(self, *args,
21152120
extend3d=False, stride=5, zdir='z', offset=None, **kwargs):
21162121
"""
@@ -2133,6 +2138,8 @@ def tricontour(self, *args,
21332138
offset : float, optional
21342139
If specified, plot a projection of the contour lines at this
21352140
position in a plane normal to zdir.
2141+
data : indexable object, optional
2142+
DATA_PARAMETER_PLACEHOLDER
21362143
*args, **kwargs
21372144
Other arguments are forwarded to `matplotlib.axes.Axes.tricontour`.
21382145
@@ -2161,6 +2168,7 @@ def tricontour(self, *args,
21612168
self.auto_scale_xyz(X, Y, Z, had_data)
21622169
return cset
21632170

2171+
@_preprocess_data()
21642172
def contourf(self, X, Y, Z, *args, zdir='z', offset=None, **kwargs):
21652173
"""
21662174
Create a 3D filled contour plot.
@@ -2174,6 +2182,8 @@ def contourf(self, X, Y, Z, *args, zdir='z', offset=None, **kwargs):
21742182
offset : float, optional
21752183
If specified, plot a projection of the contour lines at this
21762184
position in a plane normal to zdir.
2185+
data : indexable object, optional
2186+
DATA_PARAMETER_PLACEHOLDER
21772187
*args, **kwargs
21782188
Other arguments are forwarded to `matplotlib.axes.Axes.contourf`.
21792189
@@ -2192,6 +2202,7 @@ def contourf(self, X, Y, Z, *args, zdir='z', offset=None, **kwargs):
21922202

21932203
contourf3D = contourf
21942204

2205+
@_preprocess_data()
21952206
def tricontourf(self, *args, zdir='z', offset=None, **kwargs):
21962207
"""
21972208
Create a 3D filled contour plot.
@@ -2209,6 +2220,8 @@ def tricontourf(self, *args, zdir='z', offset=None, **kwargs):
22092220
offset : float, optional
22102221
If specified, plot a projection of the contour lines at this
22112222
position in a plane normal to zdir.
2223+
data : indexable object, optional
2224+
DATA_PARAMETER_PLACEHOLDER
22122225
*args, **kwargs
22132226
Other arguments are forwarded to
22142227
`matplotlib.axes.Axes.tricontourf`.
@@ -2347,6 +2360,7 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=True,
23472360

23482361
scatter3D = scatter
23492362

2363+
@_preprocess_data()
23502364
def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
23512365
"""
23522366
Add 2D bar(s).
@@ -2362,6 +2376,8 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
23622376
used for all bars.
23632377
zdir : {'x', 'y', 'z'}, default: 'z'
23642378
When plotting 2D data, the direction to use as z ('x', 'y' or 'z').
2379+
data : indexable object, optional
2380+
DATA_PARAMETER_PLACEHOLDER
23652381
**kwargs
23662382
Other arguments are forwarded to `matplotlib.axes.Axes.bar`.
23672383
@@ -2398,6 +2414,7 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
23982414

23992415
return patches
24002416

2417+
@_preprocess_data()
24012418
def bar3d(self, x, y, z, dx, dy, dz, color=None,
24022419
zsort='average', shade=True, lightsource=None, *args, **kwargs):
24032420
"""
@@ -2446,6 +2463,9 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
24462463
lightsource : `~matplotlib.colors.LightSource`
24472464
The lightsource to use when *shade* is True.
24482465
2466+
data : indexable object, optional
2467+
DATA_PARAMETER_PLACEHOLDER
2468+
24492469
**kwargs
24502470
Any additional keyword arguments are passed onto
24512471
`~.art3d.Poly3DCollection`.
@@ -2567,6 +2587,7 @@ def set_title(self, label, fontdict=None, loc='center', **kwargs):
25672587
self.title.set_y(0.92 * y)
25682588
return ret
25692589

2590+
@_preprocess_data()
25702591
def quiver(self, *args,
25712592
length=1, arrow_length_ratio=.3, pivot='tail', normalize=False,
25722593
**kwargs):
@@ -2604,6 +2625,9 @@ def quiver(self, *args,
26042625
Whether all arrows are normalized to have the same length, or keep
26052626
the lengths defined by *u*, *v*, and *w*.
26062627
2628+
data : indexable object, optional
2629+
DATA_PARAMETER_PLACEHOLDER
2630+
26072631
**kwargs
26082632
Any additional keyword arguments are delegated to
26092633
:class:`~matplotlib.collections.LineCollection`
@@ -2932,6 +2956,7 @@ def permutation_matrices(n):
29322956

29332957
return polygons
29342958

2959+
@_preprocess_data(replace_names=["x", "y", "z", "xerr", "yerr", "zerr"])
29352960
def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='',
29362961
barsabove=False, errorevery=1, ecolor=None, elinewidth=None,
29372962
capsize=None, capthick=None, xlolims=False, xuplims=False,
@@ -3027,6 +3052,9 @@ def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='',
30273052
30283053
Other Parameters
30293054
----------------
3055+
data : indexable object, optional
3056+
DATA_PARAMETER_PLACEHOLDER
3057+
30303058
**kwargs
30313059
All other keyword arguments for styling errorbar lines are passed
30323060
`~mpl_toolkits.mplot3d.art3d.Line3DCollection`.
@@ -3304,6 +3332,7 @@ def get_tightbbox(self, renderer, call_axes_locator=True,
33043332
batch.append(axis_bb)
33053333
return mtransforms.Bbox.union(batch)
33063334

3335+
@_preprocess_data()
33073336
def stem(self, x, y, z, *, linefmt='C0-', markerfmt='C0o', basefmt='C3-',
33083337
bottom=0, label=None, orientation='z'):
33093338
"""
@@ -3355,6 +3384,9 @@ def stem(self, x, y, z, *, linefmt='C0-', markerfmt='C0o', basefmt='C3-',
33553384
orientation : {'x', 'y', 'z'}, default: 'z'
33563385
The direction along which stems are drawn.
33573386
3387+
data : indexable object, optional
3388+
DATA_PARAMETER_PLACEHOLDER
3389+
33583390
Returns
33593391
-------
33603392
`.StemContainer`

0 commit comments

Comments
 (0)