Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Support plotting objects orbiting around different attractors #204

Open
anhiga opened this issue Aug 11, 2017 · 9 comments
Open

Support plotting objects orbiting around different attractors #204

anhiga opened this issue Aug 11, 2017 · 9 comments

Comments

@anhiga
Copy link
Member

anhiga commented Aug 11, 2017

When there are two (or more) different attractors in a plot, all of them are located in (0, 0), what leads to:
iss_eros

@astrojuanlu
Copy link
Member

Can you upload a minimal version of the code as well?

@anhiga
Copy link
Member Author

anhiga commented Aug 11, 2017

I'm sorry, here it is 😄 :

from poliastro.neos import neows
from poliastro.plotting import OrbitPlotter

# Attractor: Earth
from poliastro.examples import iss

#Attractor: Sun
eros = neows.orbit_from_name('eros')

frame = OrbitPlotter()
frame.plot(iss, label='iss')
frame.plot(eros, label='eros')

@anhiga
Copy link
Member Author

anhiga commented Aug 11, 2017

Well, actually the first plot is previous to #199 fix. Currently the problem is still the same, altough:
figure_1

@astrojuanlu astrojuanlu added this to the 0.8 milestone Aug 30, 2017
@astrojuanlu
Copy link
Member

The first plot sets the frame and the attractor. We are projecting the following orbits to the correct frame, but not centering them in the correct attractor. With better reference frame handling (#218) and better hyperbolic handling (#111, itself blocked on the former) this should be possible.

@astrojuanlu astrojuanlu added the status:blocked Some other change is needed before working on this (see discussion) label Sep 8, 2017
@astrojuanlu
Copy link
Member

Won't arrive in time for November, postponing.

@astrojuanlu astrojuanlu modified the milestones: 0.8, Future Oct 8, 2017
@astrojuanlu astrojuanlu removed this from the Future milestone Nov 20, 2017
@astrojuanlu
Copy link
Member

In #332 we added a NotImplementedError, so at least now the result is not garbage. We still have to address #111 before working on this one.

@shreyasbapat
Copy link
Member

Is there any reason this should be blocked now?

@astrojuanlu
Copy link
Member

Thanks @shreyasbapat, this is not blocked anymore.

@astrojuanlu astrojuanlu removed the status:blocked Some other change is needed before working on this (see discussion) label Mar 17, 2019
@astrojuanlu
Copy link
Member

Modern way to reproduce this:

from poliastro.twobody import Orbit
from poliastro.plotting.static import StaticOrbitPlotter

# Attractor: Earth
from poliastro.examples import iss

# Attractor: Sun
eros = Orbit.from_sbdb("eros")

frame = StaticOrbitPlotter()
frame.plot(iss, label="iss")
frame.plot(eros, label="eros")

@astrojuanlu astrojuanlu changed the title Problem when plotting two attractors Support plotting objects orbiting around different attractors Feb 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants