Python Forum
Error when animating 3D plot
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when animating 3D plot
#2
set_3d_properties must expect an array. Supply one. May as well pass arrays to dot1.set_data too.
def animate(num,x,y, z, line1,dot1):
     
    line1.set_data(np.array([x[0][:num], y[0][:num]]))
    line1.set_3d_properties(z[0][:num])
     
    dot1.set_data(np.array([x[0][num:num+1], y[0][num:num+1]]))
    dot1.set_3d_properties(z[0][num:num+1])
     
    return line1, dot1
Tee likes this post
Reply


Messages In This Thread
Error when animating 3D plot - by Tee - Jul-03-2023, 04:34 AM
RE: Error when animating 3D plot - by deanhystad - Jul-03-2023, 12:02 PM
RE: Error when animating 3D plot - by Tee - Jul-03-2023, 12:32 PM
RE: Error when animating 3D plot - by deanhystad - Jul-03-2023, 12:45 PM
RE: Error when animating 3D plot - by Tee - Jul-03-2023, 08:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Value Error when Trying to Plot Filtered Waveforms mkohler 1 196 May-09-2024, 05:33 PM
Last Post: deanhystad
  Likert survey data plot error Andrzej_Andrzej 6 1,560 Jul-16-2023, 10:11 PM
Last Post: deanhystad
  How to plot intraday data of several days in one plot mistermister 3 2,995 Dec-15-2020, 07:43 PM
Last Post: deanhystad
  How to plot vertically stacked plot with same x-axis and SriMekala 0 1,968 Jun-12-2019, 03:31 PM
Last Post: SriMekala
  scatter plot error - possibly data type - TypeError: nan is not a string chudson 1 6,601 Mar-24-2019, 11:48 AM
Last Post: chudson
  Animating Random Walk Excelsiscelia 2 5,296 Nov-24-2018, 08:53 AM
Last Post: Excelsiscelia

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020