Open ghost opened 4 years ago
For a school project I have two datasets that contain the stellar and dark matter components of a galaxy. I would like to animate to show how they move together in time, but have no idea how to animate the two datasets simultaneously.
I have tried the following:
fig = ipv.figure(width=800, height=500)
s1 = ipv.scatter(orbit_stellar.xyz.value, color = 'black', marker = 'sphere', size = 0.5) s2 = ipv.scatter(orbit_dmatter.xyz.value, color = 'red', marker = 'sphere', size = 0.5)
ipv.xyzlim(-15,15) ipv.xlabel('x [kpc]') ipv.ylabel('y [kpc]') ipv.zlabel('z [kpc]')
ipv.animation_control(s1) ipv.animation_control(s2)
ipv.show()
but it gives me two separate animations within the same frame.
How do I simulate two datasets simultaneously in a single frame?
ipv.animation_control([s1, s2]) or ipv.animation_control(fig.scatters)
ipv.animation_control([s1, s2])
ipv.animation_control(fig.scatters)
For a school project I have two datasets that contain the stellar and dark matter components of a galaxy. I would like to animate to show how they move together in time, but have no idea how to animate the two datasets simultaneously.
I have tried the following:
fig = ipv.figure(width=800, height=500)
s1 = ipv.scatter(orbit_stellar.xyz.value, color = 'black', marker = 'sphere', size = 0.5) s2 = ipv.scatter(orbit_dmatter.xyz.value, color = 'red', marker = 'sphere', size = 0.5)
ipv.xyzlim(-15,15) ipv.xlabel('x [kpc]') ipv.ylabel('y [kpc]') ipv.zlabel('z [kpc]')
ipv.animation_control(s1) ipv.animation_control(s2)
ipv.show()
but it gives me two separate animations within the same frame.
How do I simulate two datasets simultaneously in a single frame?