RealFormatter
- class pysmithchart.formatters.RealFormatter(axes, *args, **kwargs)[source]
Bases:
FormatterFormatter for the real axis of a Smith chart.
This formatter formats tick values for the real axis by printing numbers as floats, removing trailing zeros and unnecessary decimal points. Special cases include returning an empty string ‘’ for values near zero.
- Parameters:
axes (SmithAxes) – The parent SmithAxes instance associated with this formatter.
- Raises:
AssertionError – If axes is not an instance of SmithAxes.
Example
>>> formatter = RealFormatter(axes) >>> print(formatter(0.1)) # "0.1" >>> print(formatter(0)) # ""
Methods Summary
__call__(x[, pos])Format the given tick value.
Methods Documentation