A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://ultraplot.readthedocs.io/en/latest/api/ultraplot.ticker.SimpleFormatter.html below:

SimpleFormatter — UltraPlot documentation

UltraPlot SimpleFormatter
class SimpleFormatter(precision=None, zerotrim=None, tickrange=None, wraprange=None, prefix=None, suffix=None, negpos=None)[source]

Bases: Formatter

A general purpose number formatter. This is similar to AutoFormatter but suitable for arbitrary formatting not necessarily associated with an Axis instance.

Parameters:
  • precision (int, default: {6, 2}) – The maximum number of digits after the decimal point. Default is 6 when zerotrim is True and 2 otherwise.

  • zerotrim (bool, default: rc['format.zerotrim']) – Whether to trim trailing decimal zeros.

  • tickrange (2-tuple of float, optional) – Range within which major tick marks are labeled. All ticks are labeled by default.

  • wraprange (2-tuple of float, optional) – Range outside of which tick values are wrapped. For example, (-180, 180) will format a value of 200 as -160.

  • prefix, suffix (str, optional) – Prefix and suffix for all tick strings. The suffix is added before the optional negpos suffix.

  • negpos (str, optional) – Length-2 string indicating the suffix for “negative” and “positive” numbers, meant to replace the minus sign.

Methods Summary

__call__(x[, pos])

Convert number to a string.

Methods Documentation

__call__(x, pos=None)[source]

Convert number to a string.

Parameters:
  • x (float) – The value.

  • pos (float, optional) – The position.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4