You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xplt/phasespace.py
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,8 @@
24
24
25
25
26
26
classPhaseSpacePlot(XPlot, ParticlePlotMixin):
27
+
"""A plot for phase space distributions"""
28
+
27
29
def__init__(
28
30
self,
29
31
particles=None,
@@ -53,7 +55,6 @@ def __init__(
53
55
**kwargs,
54
56
):
55
57
"""
56
-
A plot for phase space distributions
57
58
58
59
Args:
59
60
particles (Any): A dictionary with particle information
@@ -64,22 +65,22 @@ def __init__(
64
65
In addition, abbreviations for x-y-parameter pairs are supported (e.g. 'x' for 'x-px').
65
66
For normalized coordinates, use uppercase letters (e.g. 'X' for 'X-Px').
66
67
plot (str): Defines the type of plot. Can be 'auto', 'scatter' or 'hist'. Default is 'auto' for which the plot type is chosen automatically based on the number of particles.
67
-
scatter_kwargs (dict): Additional kwargs for scatter plot
68
-
hist_kwargs (dist): Additional kwargs for 2D histogram plot (see :meth:`matplotlib.pyplot.hexbin`)
68
+
scatter_kwargs (dict): Additional kwargs for scatter plot, see :meth:`matplotlib.axes.Axes.scatter`.
69
+
hist_kwargs (dist): Additional kwargs for 2D histogram plot, see :meth:`matplotlib.axes.Axes.hexbin`.
69
70
mask (Any): An index mask to select particles to plot. If None, all particles are plotted.
70
71
masks (list[mask]): List of masks for each subplot.
71
72
color (str | list[str]): Properties defining the color of points for the scatter plot(s). Implies plot='scatter'. Pass a list of properties to use different values for each subplot
72
73
cmap (str): Colormap to use for the hist plot.
73
74
cbar_loc (str): Location of the colorbar, such as 'auto', 'right', 'inside upper right', etc.
74
75
Use None to disable colorbar.
75
76
projections (bool | str | list): Add histogrammed projections onto axis. Can be True, False, "x", "y", "auto" or a list of these for each subplot
76
-
projections_kwargs (dict): Additional kwargs for histogram projection (step plot)
77
+
projections_kwargs (dict): Additional kwargs for histogram projection, see :meth:`matplotlib.axes.Axes.step`.
77
78
mean (bool | list): Whether to indicate mean of distribution with a cross marker. Boolean or list of booleans for each subplot.
78
-
mean_kwargs (dict): Additional kwargs for mean cross
79
+
mean_kwargs (dict): Additional kwargs for marker, see :meth:`matplotlib.axes.Axes.plot`.
79
80
std (bool | list): Whether to indicate standard deviation of distribution with an ellipse. Boolean or list of booleans for each subplot.
80
-
std_kwargs (dict): Additional kwargs for std ellipses.
81
+
std_kwargs (dict): Additional kwargs for std ellipses, see :class:`matplotlib.patches.Ellipse`.
81
82
percentiles (list): List of percentiles (in percent) to indicate in the distribution with ellipses. Can also be a list of lists for each subplot.
82
-
percentile_kwargs (dict): Additional kwargs for percentile ellipses.
83
+
percentile_kwargs (dict): Additional kwargs for percentile ellipses, see :class:`matplotlib.patches.Ellipse`.
83
84
ncols (int | None): Number of columns in subplot layout. If None, the layout is determined automatically.
84
85
nrows (int | None): Number of columns in subplot layout. If None, the layout is determined automatically.
85
86
titles (list[str]): List of titles for each subplot or 'auto' to automatically set titles based on plot kind.
0 commit comments