API reference¶
Everything is available at the top level of the package:
import plotastro as pa
The reference is split by topic into the pages below, grouped in three sets. Each table lists everything a page documents. The guides (Quickstart, Colours, Markers, line styles and panel labels, Author lists from a CSV) show the same features in use.
Figures¶
name |
what it does |
|---|---|
activate a journal’s style, optionally with a palette, colormap, LaTeX or rcParams |
|
the journal of the last |
|
figure dimensions matching a journal’s column or text width |
|
|
|
save a figure in several formats at once |
|
journal widths, the default aspect ratio, the |
|
deprecated form of |
Markers, line styles and panel labels
name |
what it does |
|---|---|
marker sequence and named dash patterns |
|
a property cycle pairing colours with markers and/or dashes |
|
(a), (b), (c) panel labels |
|
reference charts of the markers and dash patterns |
Colours¶
name |
what it does |
|---|---|
the default colour-blind-friendly cycle, by name and in order |
|
more palettes |
|
the Euclid niceplots colour schemes, by name |
|
matched shades without transparency |
|
swatch chart of a palette |
CMasher colours and colormaps (optional cmasher package)
name |
what it does |
|---|---|
|
|
a CMasher colormap, optionally cut or split into levels |
Colour-vision-deficiency checks
name |
what it does |
|---|---|
how colours look with a colour-vision deficiency, or in greyscale |
|
a palette next to its simulations |
|
a whole rendered figure next to its simulations |
LaTeX output¶
name |
what it does |
|---|---|
LaTeX author/affiliation block for a journal, from a CSV file |
|
|
the same from the command line |
Package¶
pa.__version__ is the installed version, as a string. Importing
plotastro also registers its styles with matplotlib, so
plt.style.use("mnras") works anywhere afterwards (see
With plain matplotlib).