pyrolite.plot.spider#
- pyrolite.plot.spider.spider(arr: ndarray, indexes=None, ax: Axes | None = None, label: str | None = None, logy: bool = True, yextent: tuple[float, float] | None = None, mode: str = 'plot', unity_line: bool = False, scatter_kw: dict | None = None, line_kw: dict | None = None, set_ticks: bool = True, autoscale: bool = True, **kwargs) Axes[source]#
Plots spidergrams for trace elements data. Additional arguments are typically forwarded to respective
matplotlibfunctionsplot()andscatter().- Parameters:
arr (numpy.ndarray) – Data array.
indexes (: numpy.ndarray) – Numerical indexes of x-axis positions.
ax (matplotlib.axes.Axes, None) – The subplot to draw on.
label (str, None) – Label for the individual series.
logy (bool) – Whether to use a log y-axis.
yextent (tuple) – Extent in the y direction for conditional probability plots, to limit the gridspace over which the kernel density estimates are evaluated.
mode (str, [“plot”, “fill”, “binkde”, “ckde”, “kde”, “hist”]) – Mode for plot. Plot will produce a line-scatter diagram. Fill will return a filled range. Density will return a conditional density diagram.
unity_line (bool) – Add a line at y=1 for reference.
scatter_kw (dict) – Keyword parameters to be passed to the scatter plotting function.
line_kw (dict) – Keyword parameters to be passed to the line plotting function.
set_ticks (bool) – Whether to set the x-axis ticks according to the specified index.
autoscale (bool) – Whether to autoscale the y-axis limits for standard spider plots.
- Returns:
Axes on which the spiderplot is plotted.
- Return type:
Notes
By using separate lines and scatterplots, values between two missing items are still presented.
See also: *
matplotlib.pyplot.plot()*matplotlib.pyplot.scatter()*REE_v_radii().Todo
Might be able to speed up lines with
LineCollection.Legend entries
- pyrolite.plot.spider.REE_v_radii(arr: ndarray | None = None, ax: Axes | None = None, ree: list[str] | None = None, index: str = 'elements', mode: str = 'plot', logy: bool = True, tl_rotation: float = 60, unity_line: bool = False, scatter_kw: dict | None = None, line_kw: dict | None = None, set_labels: bool = True, set_ticks: bool = True, **kwargs) Axes[source]#
Creates an axis for a REE diagram with ionic radii along the x axis.
- Parameters:
arr (numpy.ndarray) – Data array.
ax (matplotlib.axes.Axes, None) – Optional designation of axes to reconfigure.
ree (list) – List of REE to use as an index.
index (str) – Whether to plot using radii on the x-axis (‘radii’), or elements (‘elements’).
mode (str, [“plot”, “fill”, “binkde”, “ckde”, “kde”, “hist”]) – Mode for plot. Plot will produce a line-scatter diagram. Fill will return a filled range. Density will return a conditional density diagram.
logy (bool) – Whether to use a log y-axis.
tl_rotation (float) – Rotation of the numerical index labels in degrees.
unity_line (bool) – Add a line at y=1 for reference.
scatter_kw (dict) – Keyword parameters to be passed to the scatter plotting function.
line_kw (dict) – Keyword parameters to be passed to the line plotting function.
set_labels (bool) – Whether to set the x-axis ticklabels for the REE.
set_ticks (bool) – Whether to set the x-axis ticks according to the specified index.
- Returns:
Axes on which the REE_v_radii plot is added.
- Return type:
Todo
Turn this into a plot template within pyrolite.plot.templates submodule
Notes
See also:
matplotlib.pyplot.plot
matplotlib.pyplot.scatter
~pyrolite.plot.spider.spider
pyrolite.geochem.transform.lambda_lnREE