@@ -330,8 +330,38 @@ def level(p, grid, *, xnorm=None, power=False, cmap=None, vmax=3, vmin=-50,
330330
331331
332332def particles (x , * , trim = None , ax = None , xlabel = 'x (m)' , ylabel = 'y (m)' ,
333- edgecolor = '' , marker = '.' , s = 15 , ** kwargs ):
334- """Plot particle positions as scatter plot"""
333+ edgecolors = None , marker = '.' , s = 15 , ** kwargs ):
334+ """Plot particle positions as scatter plot.
335+
336+ Parameters
337+ ----------
338+ x : triple or pair of array_like
339+ x, y and optionally z components of particle positions. The z
340+ components are ignored.
341+ If the values are complex, the imaginary parts are ignored.
342+
343+ Returns
344+ -------
345+ Scatter
346+ See :func:`matplotlib.pyplot.scatter`.
347+
348+ Other Parameters
349+ ----------------
350+ trim : array of float, optional
351+ xmin, xmax, ymin, ymax limits for which the particles are plotted.
352+ ax : Axes, optional
353+ If given, the plot is created on *ax* instead of the current
354+ axis (see :func:`matplotlib.pyplot.gca`).
355+ xlabel, ylabel : str
356+ Overwrite default x/y labels. Use ``xlabel=''`` and
357+ ``ylabel=''`` to remove x/y labels. The labels can be changed
358+ afterwards with :func:`matplotlib.pyplot.xlabel` and
359+ :func:`matplotlib.pyplot.ylabel`.
360+ edgecolors, markr, s, **kwargs
361+ All further parameters are forwarded to
362+ :func:`matplotlib.pyplot.scatter`.
363+
364+ """
335365 XX , YY = [_np .real (c ) for c in x [:2 ]]
336366
337367 if trim is not None :
@@ -348,7 +378,7 @@ def particles(x, *, trim=None, ax=None, xlabel='x (m)', ylabel='y (m)',
348378 ax .set_xlabel (xlabel )
349379 if ylabel :
350380 ax .set_ylabel (ylabel )
351- return ax .scatter (XX , YY , edgecolor = edgecolor , marker = marker , s = s ,
381+ return ax .scatter (XX , YY , edgecolors = edgecolors , marker = marker , s = s ,
352382 ** kwargs )
353383
354384
0 commit comments