arviz_plots.backend.plotly.multiple_lines

Contents

arviz_plots.backend.plotly.multiple_lines#

arviz_plots.backend.plotly.multiple_lines(x, y, target, *, color=<arviz_plots.backend.plotly.UnsetDefault object>, alpha=<arviz_plots.backend.plotly.UnsetDefault object>, width=<arviz_plots.backend.plotly.UnsetDefault object>, linestyle=<arviz_plots.backend.plotly.UnsetDefault object>, **artist_kws)[source]#

Plot multiple lines on a single Plotly target using shared x-values.

Parameters:
x(N,) array_like

Shared x-axis values for all lines.

y(N, M) array_like

Each of the m columns represents the y-values for one line.

targetPlotlyPlot

The target plot to draw on.

color, alpha, width, linestyleAny, optional

See {ref}`backend_interface_arguments` for their description

**artist_kws

Extra keyword arguments. Passed to plotly.graph_objects.Scatter

Returns:
plotly.graph_object.Scatter

Plotly trace representing all lines.

Notes

This function uses a high-performance method by concatenating all line data into single x and y arrays, separated by np.nan. This allows Plotly to draw all lines in a single trace object.