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

Fix attractor size when plotting different orbits #130

Closed
astrojuanlu opened this issue Aug 7, 2016 · 3 comments · Fixed by #199
Closed

Fix attractor size when plotting different orbits #130

astrojuanlu opened this issue Aug 7, 2016 · 3 comments · Fixed by #199
Assignees

Comments

@astrojuanlu
Copy link
Member

No description provided.

@astrojuanlu astrojuanlu added this to the 0.6 milestone Aug 7, 2016
@astrojuanlu astrojuanlu removed this from the 0.6 milestone Feb 5, 2017
@astrojuanlu astrojuanlu modified the milestone: 0.7 Feb 12, 2017
@astrojuanlu
Copy link
Member Author

Related to #111. Postponing.

@astrojuanlu astrojuanlu modified the milestones: Future, 0.7 Feb 26, 2017
@anhiga
Copy link
Member

anhiga commented Aug 7, 2017

I was about to open an issue when I saw this one.

As title says, attractor size when plotting distant orbits seems too big.
figure_1

It can be fixed changing line 126 in plotting.py from:

radius = max(orbit.attractor.R.to(u.km).value, orbit.r_p.to(u.km).value / 6) 

to

radius = orbit.attractor.R.to(u.km).value

but I suppose that without that max statement, attractor would appear really small in most cases, so I don't know if there is any solution.

@astrojuanlu
Copy link
Member Author

but I suppose that without that max statement, attractor would appear really small in most cases, so I don't know if there is any solution.

Yep, that's the problem. There is also another thing:

https://github.com/poliastro/poliastro/blob/286e524/src/poliastro/plotting.py#L125

The attractor is being plotted one time for each planet. We could always plot the "real" radius, and although it would be too small in most cases, it is the easiest way to fix a sensible value without ruining the plot. Perhaps we should plot the attractor only once in the first place?

@ghost ghost assigned anhiga Aug 7, 2017
@ghost ghost added the 2 - In Progress label Aug 7, 2017
@ghost ghost removed the 2 - In Progress label Aug 8, 2017
@astrojuanlu astrojuanlu modified the milestone: Future Aug 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants