Skip to content

Clarify how to get data from Line3D and fix formatting issue #26148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/mpl_toolkits/mplot3d/art3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down
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