mwplotlib
An extension to Matplotlib that plots the shape of the Milky Way.
Installation
pip install mwplotlib
Usage
Here is a simple example of how to use mwplotlib:
from mwplotlib import MilkyWay
import matplotlib.pyplot as plt
# Plot the Milky Way in polar coordinates (region-style)
plt.figure(figsize=(9, 9))
plt.MilkyWay.shape(plot_type="polar", style="region")
# Plot the Milky Way in polar coordinates (line-style)
plt.figure(figsize=(9, 9))
plt.MilkyWay.shape(plot_type="polar", style="line")
# Plot the Milky Way in Cartesian coordinates (region-style)
plt.figure(figsize=(9, 9))
plt.MilkyWay.shape(plot_type="cartesian", style="region")
# Plot the Milky Way in Cartesian coordinates (line-style)
plt.figure(figsize=(9, 9))
plt.MilkyWay.shape(plot_type="cartesian", style="line")
For more examples of usage, please refer to examples notebook. Those examples are also available on Google Colab:
Reference
The galaxy model and data used in this package is based on the following paper:
@ARTICLE{2023ApJ...947...54X,
author = {{Xu}, Y. and {Hao}, C.~J. and {Liu}, D.~J. and {Lin}, Z.~H. and {Bian}, S.~B. and {Hou}, L.~G. and {Li}, J.~J. and {Li}, Y.~J.},
title = "{What Does the Milky Way Look Like?}",
journal = {\apj},
keywords = {Galaxy structure, Milky Way Galaxy, Trigonometric parallax, 622, 1054, 1713},
year = 2023,
month = apr,
volume = {947},
number = {2},
eid = {54},
pages = {54},
doi = {10.3847/1538-4357/acc45c},
adsurl = {https://ui.adsabs.harvard.edu/abs/2023ApJ...947...54X},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
Please BOTH cite the above paper AND acknowledge this package if you are using it in your research.
License
This package is licensed under the MIT license. See LICENSE for details.
Acknowledgement
We would like to thank the authors of the above paper for making their data publicly available, which made this package possible. We would also like to credit Prof. Ryan Trainor at Franklin and Marshall College for his guidance and support.
Metadata
Release files for mwplotlib 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mwplotlib-1.1.3.tar.gz | 21.0 kB | Without provenance | Details for mwplotlib-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mwplotlib-1.1.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for mwplotlib-1.1.3-py2.py3-none-any.whl |
Total release size: 41.7 kB
Release files / mwplotlib-1.1.3.tar.gz
| Download URL | mwplotlib-1.1.3.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9db577ee6e31ac7aee53bebcfe72809a8aec6ed8b0417b186e1542e10a959e25
|
|
BLAKE2b-256 checksum How to use checksums |
e6e01909719c3f868f970c1704f290a9766a552065ae37b99f347354db07b794
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Release files / mwplotlib-1.1.3-py2.py3-none-any.whl
| Download URL | mwplotlib-1.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5624cff9ae89e28b1e94cad6aac30b493d3e1261ac3102b59636b004c0ac7e9d
|
|
BLAKE2b-256 checksum How to use checksums |
cfb36c3f37431919109cf405704977917ff1bd89d139df933f2e0a38724ba4b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Security for mwplotlib 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.