Changelog¶
1.1.0 — 2026-10-06¶
The stable release of the 1.1 series: everything in the 1.1.0b1 and
1.1.0b2 betas below, plus documentation. pip install plotastro now
gives this version. No change in behaviour since 1.1.0b2.
Added¶
Install instructions for conda-forge (
conda install -c conda-forge plotastro, Python 3.11 or newer).The API reference is split into one page per topic (styles, colours, CMasher, markers, authors, accessibility). The colours page has a longer guide to colormaps: which map suits which kind of data, lines coloured by a parameter with a colour bar, diverging and cyclic data, and common errors. The tutorial notebook runs the same examples.
The docstrings of
lighten,darken,check_colors,current_journal,subplots,set_size,style_cycler,show_colors,show_markersandshow_linestylesnow list their parameters and return values.A test checks that every public name is in the API reference and that the constants it shows match the code.
1.1.0b2 — 2026-10-06 (beta)¶
A pre-release: pip install plotastro still gives the stable 1.0.1. To try
this beta, use pip install --pre plotastro (or pip install "plotastro==1.1.0b2").
Changed¶
Legends now sit on a translucent white background (70 % opaque, no border) instead of none, so they stay readable over data and grid lines. The
euclidstyle keeps niceplots’ framed legends.
1.1.0b1 — 2026-10-06 (beta)¶
A pre-release: pip install plotastro still gives the stable 1.0.1. To try
this beta, use pip install --pre plotastro (or pip install "plotastro==1.1.0b1").
Added¶
euclidstyle (aliasec) for Euclid Consortium papers, adapted from the Euclid Consortium Editorial Board’s niceplots (GPL-3.0, Euclid-internal): sans-serif 10 pt text with Computer Modern maths, no grid or minor ticks, framed legends, Petroff-8 colours, and niceplots’ 4 × 3 in figure convention (LaTeX scales the figure into the A&A column). The settings are re-expressed in plotastro’s own template; nothing is copied from niceplots.Palettes
PETROFF8andTOL_VIBRANT, andeuclid_colors(scheme, n=)giving niceplots’ five colour schemes under their niceplots names.set_style(..., palette=...)swaps the colour cycle for any named palette or list of colours.Optional CMasher support, for discrete colours and colormaps:
cmasher_colors(cmap, n=8, cmap_range=(0.15, 0.85))samples colours from a CMasher map,cmasher_cmap(cmap, cmap_range=, n=)returns the map (optionally cut, or split intonlevels), andset_styleacceptspalette="cmr.<name>". CMasher is not a dependency: install it withpip install "plotastro[cmasher]"(orpip install cmasher). plotastro imports it only when one of these is used, and without it they raise anImportErrorsaying how to install it.set_style(..., cmap=...)sets the default colormap: any matplotlib name, or"cmr.<name>"for CMasher.
Changed¶
figsize()/subplots(): the defaultaspectnow comes from the journal (golden ratio everywhere excepteuclid, which uses 4:3).authorlist(..., journal="euclid")uses the A&A format (Euclid’saaECclass).
Fixed¶
Switching styles in one session no longer carries settings over. matplotlib only overwrites the rcParams a style names, and the styles named different ones: after
euclid, for example,set_style("mnras")orplt.style.use("mnras")kept Euclid’s tick padding. Every style now sets the same rcParams, using matplotlib’s defaults where they apply, and a test checks this.
1.0.1 — 2026-09-01¶
Added¶
Documentation site (Sphinx + Furo on Read the Docs) with the rendered tutorial notebook and a full API reference: https://plotastro.readthedocs.io.
No changes to the package code itself.
1.0.0 — 2026-09-01¶
First release as an installable package, plotastro.
Added¶
pip install plotastro; importing it registers all styles with matplotlib, soplt.style.use("mnras")works everywhere.Journal styles: MNRAS, RASTI, A&A, ApJ/ApJL (AASTeX), Open Journal of Astrophysics, PRD/PRL (REVTeX), JCAP, and Nature Astronomy (sans-serif variant), plus
thesis/beamerwidth presets. All generated from one template (tools/generate_styles.py) so they stay consistent.Helpers:
set_style,figsize,subplots,savefig,style_cycler,lighten/darken,label_panels(journal-style (a)/(b)/(c) panel labels), reference charts (show_colors/show_markers/show_linestyles).Colour-vision-deficiency checking:
simulate_cvd,check_colors, andcheck_figure(Machado et al. 2009 model; no extra dependencies).Palettes: the default colour-blind-friendly cycle (
COLORS), Okabe & Ito (OKABE_ITO), Petroff-10 (PETROFF10) and light/dark pairs (PAIRED).Author-list generator:
authorlist("authors.csv", journal=...)and theplotastro-authorscommand-line tool turn a CSV of names/affiliations/ ORCIDs/emails into the journal’s LaTeX author block (MNRAS, A&A, AASTeX, REVTeX, JCAP and generic formats), with automatic affiliation numbering and sharing. Reads real collaboration lists as-is (Authorname/Firstname+Lastnamecolumns, one row per affiliation, embedded LaTeX accents, extra columns ignored).Zero-learning-curve mode: importing plotastro registers every style with matplotlib, so
plt.style.use("mnras")+ ordinary matplotlib is the entire integration (pa.use(...)is an alias ofset_style).requirements.txt/requirements-dev.txtfor pip users; NumPy 1.x and 2.x both supported and tested in CI.Tests (pytest), CI and PyPI-publishing GitHub Actions workflows, executed tutorial notebook, MIT license.
Changed¶
Styles no longer require LaTeX: portable STIX mathtext by default, with
set_style(..., usetex=True)to opt in (newtx fonts).Submission-safe saving defaults: PDF, tight bbox, 450 dpi, TrueType font embedding (
pdf.fonttype 42).
Migration from the original repo¶
MNRAS_Style.mplstyle→plt.style.use("mnras")(afterimport plotastro).myfigsize.set_size(...)→plotastro.set_size(...)still works, but preferplotastro.figsize(...)/plotastro.subplots(...).