Configuration Options#
Every option tephpy.config carries, with the type it accepts and the
default in force. The same options, as a commented file you can edit, come
from tephpy config generate; see Configure tephpy From a File for how that
file is found and applied, and Command Line for the commands that manage
it.
This page is generated from the tables in the configuration module at build time, so it and the generated file always describe the same options.
isotherms#
- tephpy.config.isotherms.color: str | None#
Matplotlib colour for the lines and their labels.
Default:
dimgrey
- tephpy.config.isotherms.labels: bool | str | tuple[str, ...] | None#
true,false, or the diagram edges to label (bottom,top,left,right), singly or as a list.Listed edges label the members that reach them, and every member left over is labelled inline.
truelabels every member inline;falselabels none.Default:
true
- tephpy.config.isotherms.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#
Members drawn with a distinguishing style, keyed by temperature in degrees Celsius.
Each value is a mapping of style overrides –
color,linewidth,linestyleandalpha– and an omitted key falls back to the family’s own style, so{20.0: {}}is the member at20in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.Default:
{}
isobars#
- tephpy.config.isobars.color: str | None#
Matplotlib colour for the lines and their labels.
Default:
tab:blue
- tephpy.config.isobars.labels: bool | str | tuple[str, ...] | None#
true,false, or the diagram edges to label (bottom,top,left,right), singly or as a list.Listed edges label the members that reach them, and every member left over is labelled inline.
truelabels every member inline;falselabels none.Default:
true
- tephpy.config.isobars.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#
Members drawn with a distinguishing style, keyed by pressure in hPa.
Each value is a mapping of style overrides –
color,linewidth,linestyleandalpha– and an omitted key falls back to the family’s own style, so{20.0: {}}is the member at20in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.Default:
{}
dry_adiabats#
- tephpy.config.dry_adiabats.color: str | None#
Matplotlib colour for the lines and their labels.
Default:
darkgrey
- tephpy.config.dry_adiabats.labels: bool | str | tuple[str, ...] | None#
true,false, or the diagram edges to label (bottom,top,left,right), singly or as a list.Listed edges label the members that reach them, and every member left over is labelled inline.
truelabels every member inline;falselabels none.Default:
true
- tephpy.config.dry_adiabats.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#
Members drawn with a distinguishing style, keyed by potential temperature in degrees Celsius.
Each value is a mapping of style overrides –
color,linewidth,linestyleandalpha– and an omitted key falls back to the family’s own style, so{20.0: {}}is the member at20in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.Default:
{}
moist_adiabats#
- tephpy.config.moist_adiabats.color: str | None#
Matplotlib colour for the lines and their labels.
Default:
tab:orange
- tephpy.config.moist_adiabats.labels: bool | str | tuple[str, ...] | None#
true,false, or the diagram edges to label (bottom,top,left,right), singly or as a list.Listed edges label the members that reach them, and every member left over is labelled inline.
truelabels every member inline;falselabels none.Default:
true
- tephpy.config.moist_adiabats.visible: bool | None#
Whether the family is drawn at all.
Default:
true
- tephpy.config.moist_adiabats.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#
Members drawn with a distinguishing style, keyed by wet-bulb potential temperature in degrees Celsius.
Each value is a mapping of style overrides –
color,linewidth,linestyleandalpha– and an omitted key falls back to the family’s own style, so{20.0: {}}is the member at20in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.Default:
{}
- tephpy.config.moist_adiabats.values: tuple[float, ...] | None#
Explicit member wet-bulb potential temperatures in degrees Celsius. Unset, the zoom-adaptive ladder selects them.
Default: unset
mixing_ratios#
- tephpy.config.mixing_ratios.color: str | None#
Matplotlib colour for the lines and their labels.
Default:
tab:green
- tephpy.config.mixing_ratios.labels: bool | str | tuple[str, ...] | None#
true,false, or the diagram edges to label (bottom,top,left,right), singly or as a list.Listed edges label the members that reach them, and every member left over is labelled inline.
truelabels every member inline;falselabels none.Default:
true
- tephpy.config.mixing_ratios.emphasis: collections.abc.Mapping[float, collections.abc.Mapping[str, object]] | None#
Members drawn with a distinguishing style, keyed by mixing ratio in g/kg.
Each value is a mapping of style overrides –
color,linewidth,linestyleandalpha– and an omitted key falls back to the family’s own style, so{20.0: {}}is the member at20in the family’s own units, drawn at the emphasis line width in the family’s own colour. An emphasised member is always drawn, whatever the zoom-adaptive ladder would otherwise select. An empty mapping emphasises nothing.Default:
{}
diagram#
cursor#
Methods#
These entries exist so that prose can cross-reference them. The how-to Configure tephpy From a File covers tephpy.config.load() and tephpy.config.save(), the methods a configuration file involves; the rest act on the configuration already in memory.
- tephpy.config.load(path=None)#
Load a configuration file over this configuration.
import tephpy tephpy.config.load("tephpyrc.yaml") print(tephpy.config.source) # the file now in force
- tephpy.config.save(path=None)#
Write the options set on this configuration to a file.
import tephpy tephpy.config.isobars.interval = 25.0 path = tephpy.config.save("tephpyrc.yaml") # only the options you set
- tephpy.config.reset()#
Restore the pristine, hardwired configuration.
import tephpy tephpy.config.isobars.interval = 25.0 tephpy.config.reset() # back to the hardwired conventions
- tephpy.config.context(**overrides)#
Temporarily override configuration sections.
import matplotlib.pyplot as plt import tephpy # registers the "tephigram" projection with tephpy.config.context(isobars={"interval": 25.0}): fig, ax = plt.subplots(subplot_kw={"projection": "tephigram"}) # Outside the block the interval is whatever it was before.