Skip to content
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

Problem with different epochs #205

Closed
anhiga opened this issue Aug 11, 2017 · 4 comments
Closed

Problem with different epochs #205

anhiga opened this issue Aug 11, 2017 · 4 comments

Comments

@anhiga
Copy link
Member

anhiga commented Aug 11, 2017

If you plot orbits with different epochs, only the last epoch is showed in the title:

In [1]: from poliastro.neos import dastcom5
In [2]: from poliastro.plotting import OrbitPlotter
In [3]: eros = dastcom5.orbit_from_name('eros')[0]
In [4]: apophis = dastcom5.orbit_from_name('apophis')[0]
In [5]: eros.epoch
Out[5]: <Time object: scale='utc' format='jd' value=2451960.5>
In [6]: apophis.epoch
Out[6]: <Time object: scale='utc' format='jd' value=2454441.5>
In [7]: frame = OrbitPlotter()
In [8]: frame.plot(eros, label='eros')
In [9]: frame.plot(apophis, label='apophis')

epochs

I think you should be able to choose the epoch. Maybe we should use Orbit.propagate function.

@anhiga anhiga mentioned this issue Aug 23, 2017
@astrojuanlu astrojuanlu added this to the 0.7 milestone Aug 30, 2017
@astrojuanlu
Copy link
Member

After discussion in the wiki (see https://github.com/poliastro/poliastro/wiki/Plotting-multiple-orbits:-use-cases) I'm labeling this as a bug.

@astrojuanlu
Copy link
Member

I will give you the honor of submitting a plot showcasing the solution and closing this issue @anhiga :)

@anhiga
Copy link
Member Author

anhiga commented Sep 5, 2017

This is how plots look now.
figure_1

from poliastro.examples import iss, molniya
from poliastro.plotting import OrbitPlotter

frame = OrbitPlotter()
frame.plot(iss, label='iss')
frame.plot(molniya, label='Molniya')

@anhiga anhiga closed this as completed Sep 5, 2017
@ghost ghost removed the 2 - In Progress label Sep 5, 2017
@astrojuanlu
Copy link
Member

Using %matplotlib notebook and some patience one can arrive to something like this:

png image 482 x 684 pixels

While I admit it is not optimal (notice the white space above the plot, apart from the manual tweaking) this fixes the original issue. Interested readers might want to check out #214, #226, #230 and matplotlib/matplotlib#9155.

@astrojuanlu astrojuanlu mentioned this issue Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants