From aa34c8a382c405ebb12a1eff9c18c8619dde2250 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:12:20 +0100 Subject: [PATCH] DOC: Slightly improve the LineCollection docstring Closes #26738. --- lib/matplotlib/collections.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index a78f1838357e..f18d5a4c3a8c 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -1612,14 +1612,13 @@ def __init__(self, segments, # Can be None. """ Parameters ---------- - segments : list of array-like - A sequence (*line0*, *line1*, *line2*) of lines, where each line is a list - of points:: + segments : list of (N, 2) array-like + A sequence ``[line0, line1, ...]`` where each line is a (N, 2)-shape + array-like containing points:: - lineN = [(x0, y0), (x1, y1), ... (xm, ym)] + line0 = [(x0, y0), (x1, y1), ...] - or the equivalent Mx2 numpy array with two columns. Each line - can have a different number of segments. + Each line can contain a different number of points. linewidths : float or list of float, default: :rc:`lines.linewidth` The width of each line in points. colors : :mpltype:`color` or list of color, default: :rc:`lines.color`