From 6663a1d67eb5a067ecb2cfee56e8e28bc2b90379 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 19 Jun 2023 12:44:43 +0200 Subject: [PATCH] Clarify how to get data from Line3D and fix formatting issue --- lib/mpl_toolkits/mplot3d/art3d.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/mpl_toolkits/mplot3d/art3d.py b/lib/mpl_toolkits/mplot3d/art3d.py index 20a1566d31a0..286189e0e800 100644 --- a/lib/mpl_toolkits/mplot3d/art3d.py +++ b/lib/mpl_toolkits/mplot3d/art3d.py @@ -183,6 +183,12 @@ def text_2d_to_3d(obj, z=0, zdir='z'): class Line3D(lines.Line2D): """ 3D line object. + + .. note:: Use `get_data_3d` to obtain the data associated with the line. + `~.Line2D.get_data`, `~.Line2D.get_xdata`, and `~.Line2D.get_ydata` return + the x- and y-coordinates of the projected 2D-line, not the x- and y-data of + the 3D-line. Similarly, use `set_data_3d` to set the data, not + `~.Line2D.set_data`, `~.Line2D.set_xdata`, and `~.Line2D.set_ydata`. """ def __init__(self, xs, ys, zs, *args, **kwargs): @@ -196,8 +202,8 @@ def __init__(self, xs, ys, zs, *args, **kwargs): The y-data to be plotted. zs : array-like The z-data to be plotted. - - Additional arguments are passed onto :func:`~matplotlib.lines.Line2D`. + *args, **kwargs : + Additional arguments are passed to `~matplotlib.lines.Line2D`. """ super().__init__([], [], *args, **kwargs) self.set_data_3d(xs, ys, zs) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy