Thanks to visit codestin.com
Credit goes to github.com

Skip to content

line3D set_data only takes in x and y data #8914

Closed
@fragapanagos

Description

@fragapanagos

Bug report

I was attempting to make an interactive 3D line plot in jupyter notebook, but noticed that line3D set_data method only takes in x and y data.

Code for reproduction
The code below can be run outside of jupyter notebook to demonstrate the problem:

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
x = [0, 1]
y = [0, 1]
z = [0, 1]
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
line = ax.plot(x,y,z)[0]
line.set_data([0,2], [0,2], [0,2])
plt.show()

Actual outcome

ValueError: too many values to unpack (expected 2)

Expected outcome

I would expect the set_data method exposed by line3D to take in 3 values.

Matplotlib version

  • Matplotlib Version: 2.0.0
  • Python Version: 3.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueOpen a pull request against these issues if there are no active ones!topic: mplot3d

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions