ThetaRadianFormatter#
- class glue.core.util.ThetaRadianFormatter(axis_label=None)#
Bases:
FormatterUsed to format the theta tick labels in radians
Attributes Summary
Methods Summary
__call__(x[, pos])Return the tick label strings for value x at tick index pos.
format_ticks(values)Return the tick label strings for all values.
rad_fn(x[, digits])Attributes Documentation
- limit_den = 10000#
- max_den = 20#
- max_num = 20#
Methods Documentation
- __call__(x, pos=None)#
Return the tick label strings for value x at tick index pos.
This is the low-level formatting primitive for a single tick in the context of multiple ticks. Any context-dependent state (e.g. locs, offset, order of magnitude) must already be configured, typically by a prior call to
format_ticksorset_locs.pos defines the index into
self.locsso that the format can depend on the location.pos=Noneindicates an unspecified location.The output may contain mathtext or LaTeX markup.
Subclasses must override this method.
- format_ticks(values)#
Return the tick label strings for all values.
This is the public API for generating tick labels. It calls
set_locsto configure context-dependent formatting state before delegating to__call__for each individual value.The output may contain mathtext or LaTeX markup.
Use this method (rather than
__call__) whenever formatting a complete set of tick values, so that formatters which need to see all tick locations (e.g. to determine precision, offsets, or which date components to display) can work correctly.
- classmethod rad_fn(x, digits=2)#