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

Comments

2 participants
@anhiga
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.

@Juanlu001 Juanlu001 added the question label Aug 11, 2017

@anhiga anhiga referenced this issue Aug 23, 2017

Closed

Epoch fix #214

@Juanlu001 Juanlu001 added this to the 0.7 milestone Aug 30, 2017

@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Aug 30, 2017

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

@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Sep 5, 2017

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

@anhiga

This comment has been minimized.

Member

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 Sep 5, 2017

@wafflebot wafflebot bot removed the 2 - In Progress label Sep 5, 2017

@Juanlu001

This comment has been minimized.

Member

Juanlu001 commented Sep 5, 2017

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.

@Juanlu001 Juanlu001 referenced this issue Sep 10, 2017

Closed

3D plotting #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment