You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that plot/plot2d and plot3d do not display anything, i've tried the following :
from numpy import radians
from scipy.constants import kilo
from orbital import earth, KeplerianElements, Maneuver, plot, plot3d
from orbital import earth_sidereal_day
molniya = KeplerianElements.with_period(
earth_sidereal_day / 2, e=0.741, i=radians(63.4), arg_pe=radians(270),
body=earth)
orbit = KeplerianElements.with_altitude(1000 * kilo, body=earth)
plot3d(molniya, title='Molniya 1', animate=True)
and got this :
C:\Users\Lucaspec72\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\animation.py:884: UserWarning: Animation was deleted without rendering anything. This is most likely not intended. To prevent deletion, assign the Animation to a variable, e.g. `anim`, that exists until you output the Animation using `plt.show()` or `anim.save()`.
warnings.warn(
i've managed to make it display by loading in matplotlib.pyplot and adding a plt.show(), but animations don't work (makes sense, since it seems like they're handled by Plotter2D and Plotter3D)
from numpy import radians
from scipy.constants import kilo
from orbital import earth, KeplerianElements, Maneuver, plot, plot3d
from orbital import earth_sidereal_day
import matplotlib.pyplot as plt #added
molniya = KeplerianElements.with_period(
earth_sidereal_day / 2, e=0.741, i=radians(63.4), arg_pe=radians(270),
body=earth)
orbit = KeplerianElements.with_altitude(1000 * kilo, body=earth)
plot3d(molniya, title='Molniya 1', animate=True)
plt.show() #added
(pointer doesn't move)
additionally, the orbit isn't properly rendered, and is hidden whenever overlapping with a planet, regardless of whether or not it's in front or behind it. That being said, this doesn't seem to happen on the screenshots in the documentation (https://pythonhosted.org/OrbitalPy/examples/plotting/plotting/#maneuvers) so it might be a side effect of displaying using plt.show.
The text was updated successfully, but these errors were encountered:
It seems that plot/plot2d and plot3d do not display anything, i've tried the following :
and got this :
i've managed to make it display by loading in matplotlib.pyplot and adding a plt.show(), but animations don't work (makes sense, since it seems like they're handled by Plotter2D and Plotter3D)
(pointer doesn't move)
additionally, the orbit isn't properly rendered, and is hidden whenever overlapping with a planet, regardless of whether or not it's in front or behind it. That being said, this doesn't seem to happen on the screenshots in the documentation (https://pythonhosted.org/OrbitalPy/examples/plotting/plotting/#maneuvers) so it might be a side effect of displaying using plt.show.
The text was updated successfully, but these errors were encountered: