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

Chaning 3D axis units? #1616

Open
saskia222 opened this issue Feb 24, 2023 · 1 comment
Open

Chaning 3D axis units? #1616

saskia222 opened this issue Feb 24, 2023 · 1 comment

Comments

@saskia222
Copy link

Hi i was wondering if there was a way to change the units on the axis to AU instead of km for the 3D plots? Thanks.

@jorgepiloto
Copy link
Member

jorgepiloto commented Feb 25, 2023

Hi @saskia222, thanks for opening this issue.

This issue has been solved in the development version of poliastro and it will be included in the next release 0.18.

You can install the latest poliastro version by doing:

python -m pip install https://github.com/poliastro/poliastro/archive/main.zip

The following example shows how to use the new axis units functionality:

from astropy import units as u

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


plotter = OrbitPlotter(length_scale_units=u.AU)
plotter.plot(molniya)
plotter.show()

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

2 participants