@@ -1561,7 +1561,7 @@ def plot_surface(self, X, Y, Z, *, norm=None, vmin=None,
1561
1561
The lightsource to use when *shade* is True.
1562
1562
1563
1563
**kwargs
1564
- Other arguments are forwarded to `.Poly3DCollection`.
1564
+ Other keyword arguments are forwarded to `.Poly3DCollection`.
1565
1565
"""
1566
1566
1567
1567
had_data = self .has_data ()
@@ -1724,7 +1724,7 @@ def plot_wireframe(self, X, Y, Z, **kwargs):
1724
1724
of the new default of ``rcount = ccount = 50``.
1725
1725
1726
1726
**kwargs
1727
- Other arguments are forwarded to `.Line3DCollection`.
1727
+ Other keyword arguments are forwarded to `.Line3DCollection`.
1728
1728
"""
1729
1729
1730
1730
had_data = self .has_data ()
@@ -1851,7 +1851,7 @@ def plot_trisurf(self, *args, color=None, norm=None, vmin=None, vmax=None,
1851
1851
lightsource : `~matplotlib.colors.LightSource`
1852
1852
The lightsource to use when *shade* is True.
1853
1853
**kwargs
1854
- All other arguments are passed on to
1854
+ All other keyword arguments are passed on to
1855
1855
:class:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
1856
1856
1857
1857
Examples
@@ -2252,7 +2252,7 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=True,
2252
2252
data : indexable object, optional
2253
2253
DATA_PARAMETER_PLACEHOLDER
2254
2254
**kwargs
2255
- All other arguments are passed on to `~.axes.Axes.scatter`.
2255
+ All other keyword arguments are passed on to `~.axes.Axes.scatter`.
2256
2256
2257
2257
Returns
2258
2258
-------
@@ -2304,7 +2304,8 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
2304
2304
data : indexable object, optional
2305
2305
DATA_PARAMETER_PLACEHOLDER
2306
2306
**kwargs
2307
- Other arguments are forwarded to `matplotlib.axes.Axes.bar`.
2307
+ Other keyword arguments are forwarded to
2308
+ `matplotlib.axes.Axes.bar`.
2308
2309
2309
2310
Returns
2310
2311
-------
@@ -2508,19 +2509,16 @@ def set_title(self, label, fontdict=None, loc='center', **kwargs):
2508
2509
return ret
2509
2510
2510
2511
@_preprocess_data ()
2511
- def quiver (self , * args ,
2512
+ def quiver (self , X , Y , Z , U , V , W , * ,
2512
2513
length = 1 , arrow_length_ratio = .3 , pivot = 'tail' , normalize = False ,
2513
2514
** kwargs ):
2514
2515
"""
2515
- ax.quiver(X, Y, Z, U, V, W, /, length=1, arrow_length_ratio=.3, \
2516
- pivot='tail', normalize=False, **kwargs)
2517
-
2518
2516
Plot a 3D field of arrows.
2519
2517
2520
- The arguments could be array-like or scalars, so long as they
2521
- they can be broadcast together. The arguments can also be
2522
- masked arrays. If an element in any of argument is masked, then
2523
- that corresponding quiver element will not be plotted.
2518
+ The arguments can be array-like or scalars, so long as they can be
2519
+ broadcast together. The arguments can also be masked arrays. If an
2520
+ element in any of argument is masked, then that corresponding quiver
2521
+ element will not be plotted.
2524
2522
2525
2523
Parameters
2526
2524
----------
@@ -2550,7 +2548,7 @@ def quiver(self, *args,
2550
2548
2551
2549
**kwargs
2552
2550
Any additional keyword arguments are delegated to
2553
- :class:`~matplotlib.collections.LineCollection `
2551
+ :class:`.Line3DCollection `
2554
2552
"""
2555
2553
2556
2554
def calc_arrows (UVW , angle = 15 ):
@@ -2581,22 +2579,15 @@ def calc_arrows(UVW, angle=15):
2581
2579
2582
2580
had_data = self .has_data ()
2583
2581
2584
- # handle args
2585
- argi = 6
2586
- if len (args ) < argi :
2587
- raise ValueError ('Wrong number of arguments. Expected %d got %d' %
2588
- (argi , len (args )))
2589
-
2590
- # first 6 arguments are X, Y, Z, U, V, W
2591
- input_args = args [:argi ]
2582
+ input_args = [X , Y , Z , U , V , W ]
2592
2583
2593
2584
# extract the masks, if any
2594
2585
masks = [k .mask for k in input_args
2595
2586
if isinstance (k , np .ma .MaskedArray )]
2596
2587
# broadcast to match the shape
2597
2588
bcast = np .broadcast_arrays (* input_args , * masks )
2598
- input_args = bcast [:argi ]
2599
- masks = bcast [argi :]
2589
+ input_args = bcast [:6 ]
2590
+ masks = bcast [6 :]
2600
2591
if masks :
2601
2592
# combine the masks into one
2602
2593
mask = functools .reduce (np .logical_or , masks )
@@ -2608,7 +2599,7 @@ def calc_arrows(UVW, angle=15):
2608
2599
2609
2600
if any (len (v ) == 0 for v in input_args ):
2610
2601
# No quivers, so just make an empty collection and return early
2611
- linec = art3d .Line3DCollection ([], * args [ argi :], * *kwargs )
2602
+ linec = art3d .Line3DCollection ([], ** kwargs )
2612
2603
self .add_collection (linec )
2613
2604
return linec
2614
2605
@@ -2622,7 +2613,7 @@ def calc_arrows(UVW, angle=15):
2622
2613
shaft_dt -= length / 2
2623
2614
2624
2615
XYZ = np .column_stack (input_args [:3 ])
2625
- UVW = np .column_stack (input_args [3 :argi ]).astype (float )
2616
+ UVW = np .column_stack (input_args [3 :]).astype (float )
2626
2617
2627
2618
# Normalize rows of UVW
2628
2619
norm = np .linalg .norm (UVW , axis = 1 )
@@ -2651,7 +2642,7 @@ def calc_arrows(UVW, angle=15):
2651
2642
else :
2652
2643
lines = []
2653
2644
2654
- linec = art3d .Line3DCollection (lines , * args [ argi :], * *kwargs )
2645
+ linec = art3d .Line3DCollection (lines , ** kwargs )
2655
2646
self .add_collection (linec )
2656
2647
2657
2648
self .auto_scale_xyz (XYZ [:, 0 ], XYZ [:, 1 ], XYZ [:, 2 ], had_data )
0 commit comments