2.2.3.16. pycsamt.api.station#
Global station-rendering controls for pyCSAMT figures.
Functions
|
Configure |
|
Reset |
Classes
Package-wide station rendering control container. |
|
|
Station-axis tick, label, and marker configuration. |
|
Marker style used to draw stations along a profile axis. |
- class pycsamt.api.station.PyCSAMTStationRendering[source]
Bases:
objectPackage-wide station rendering control container.
- style_for(preset='pseudosection')[source]
Return the station-axis style associated with
preset.- Parameters:
preset (str)
- Return type:
- apply(ax, positions, labels=None, *, preset='pseudosection', xlim=None)[source]
Apply one named station-rendering preset to
ax.
- configure(**kw)[source]
Configure station rendering using
section__attributepaths.- Parameters:
kw (Any)
- Return type:
None
- context(preset=None, **kw)[source]
Temporarily override station rendering, then restore it.
- Parameters:
- Return type:
Generator[PyCSAMTStationRendering, None, None]
- use_preset(preset)[source]
Copy one preset into the pseudosection slot.
- Parameters:
preset (str)
- Return type:
None
- reset()[source]
Reset station rendering to package defaults.
- Return type:
None
- class pycsamt.api.station.StationAxisStyle(side='top', xlabel='Station', every='auto', max_labels=14, rotation=90.0, fontsize=7, tick_length=3.0, label_tick_length=5.0, label_pad=8.0, xlabel_pad=6.0, show_all_ticks=True, show_labels=True, show_markers=True, marker=<factory>)[source]
Bases:
objectStation-axis tick, label, and marker configuration.
- Parameters:
- side: str = 'top'
- xlabel: str = 'Station'
- max_labels: int = 14
- rotation: float = 90.0
- fontsize: int = 7
- tick_length: float = 3.0
- label_tick_length: float = 5.0
- label_pad: float = 8.0
- xlabel_pad: float = 6.0
- show_all_ticks: bool = True
- show_labels: bool = True
- show_markers: bool = True
- marker: StationMarkerStyle
- compute_every(n, figwidth_in=10.0, max_label_len=4)[source]
Return the interval between visible station labels.
- label_indices(labels, figwidth_in=10.0)[source]
Return indices whose station labels should be visible.
- apply(ax, positions, labels=None, *, xlim=None, topo_elev=None)[source]
Apply station ticks, labels, and markers to
ax.- Parameters:
ax (Axes)
positions ((n,) station x positions)
labels ((n,) station name strings, optional)
xlim ((xmin, xmax) x-axis limits, optional)
topo_elev ((n,) terrain elevation in data y-units, optional) – When provided the markers are placed at the terrain surface (+ a small pad toward the viewer) instead of at the flat axis edge. Labels are drawn inline above the markers; xticklabels at the axis edge are suppressed.
- Returns:
Indices of stations whose labels are visible.
- Return type:
- class pycsamt.api.station.StationMarkerStyle(marker='v', size=34.0, facecolor='white', edgecolor='black', linewidth=0.9, alpha=1.0, offset=1.025, zorder=5)[source]
Bases:
objectMarker style used to draw stations along a profile axis.
- Parameters:
- marker: str = 'v'
- size: float = 34.0
- facecolor: str = 'white'
- edgecolor: str = 'black'
- linewidth: float = 0.9
- alpha: float = 1.0
- offset: float = 1.025
- zorder: int = 5
- pycsamt.api.station.configure_station_rendering(**kw)[source]
Configure
PYCSAMT_STATION_RENDERING.- Parameters:
kw (Any)
- Return type:
None
- pycsamt.api.station.reset_station_rendering()[source]
Reset
PYCSAMT_STATION_RENDERINGto package defaults.- Return type:
None