Skip to content

Commit 0ecb0a2

Browse files
committed
Clarify how to get data from Line3D and fix formatting issue
1 parent a73c347 commit 0ecb0a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ def text_2d_to_3d(obj, z=0, zdir='z'):
183183
class Line3D(lines.Line2D):
184184
"""
185185
3D line object.
186+
187+
.. note:: Use `get_data_3d` to obtain the data associated with the line.
188+
`~.Line2D.get_xdata` and `~.Line2D.get_ydata` will return the x- and
189+
y-coodinates of the projected line, not the x- and y-data of the 3D-line.
186190
"""
187191

188192
def __init__(self, xs, ys, zs, *args, **kwargs):
@@ -196,8 +200,8 @@ def __init__(self, xs, ys, zs, *args, **kwargs):
196200
The y-data to be plotted.
197201
zs : array-like
198202
The z-data to be plotted.
199-
200-
Additional arguments are passed onto :func:`~matplotlib.lines.Line2D`.
203+
*args, **kwargs :
204+
Additional arguments are passed to `~matplotlib.lines.Line2D`.
201205
"""
202206
super().__init__([], [], *args, **kwargs)
203207
self.set_data_3d(xs, ys, zs)

0 commit comments

Comments
 (0)