solarwindpy.TeXlabel
- class TeXlabel(mcs0, mcs1=None, axnorm=None, new_line_for_units=False, description=None)[source]
Bases:
BaseCreate a LaTeX label from measurement, component and species information.
The object can be used directly in plotting routines. String representation returns the formatted label with units.
Notes
Comparison operators and hashing use
str()of the object so two labels representing the same quantity compare equal.- __init__(mcs0, mcs1=None, axnorm=None, new_line_for_units=False, description=None)[source]
Instantiate the label.
- Parameters:
mcs0 (tuple of str) –
("M", "C", "S")wheremis the measurement,cthe component andsthe species. Empty strings are allowed for components or species.mcs1 (tuple of str or None, optional) – Denominator for fraction style labels. Units are compared and set to dimensionless when equal.
axnorm ({"c", "r", "t", "d"}, optional) – Axis normalization used when building colorbar labels.
new_line_for_units (bool, default
False) – IfTruea newline separates label and units.description (str or None, optional) – Human-readable description displayed above the mathematical label.
- property mcs0
- property mcs1
- property new_line_for_units
- property tex
- property units
- property with_units
- property path
- property axnorm
- make_species(pattern)[source]
Basic substitution of any species within a species string if the.
species has a substitution in the ion_species dictionary.
Notes
This equation might only work because \(a\rightarrow\alpha\) is the only actual translation made and, based on lexsort order, would be the first group. This function may need to be updated for more complex patterns, e.g., if we translate something like \(\mathrm{He}^{2+}\rightarrow\text{He}^{2+}\).
- property description
Optional human-readable description shown above the label.
- property logger