MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _short_float_fmt

Function _short_float_fmt

lib/matplotlib/backends/backend_svg.py:99–104  ·  view source on GitHub ↗

Create a short string representation of a float, which is %f formatting with trailing zeros and the decimal point removed.

(x)

Source from the content-addressed store, hash-verified

97
98
99def _short_float_fmt(x):
100 """
101 Create a short string representation of a float, which is %f
102 formatting with trailing zeros and the decimal point removed.
103 """
104 return f'{x:f}'.rstrip('0').rstrip('.')
105
106
107class _XMLWriter:

Callers 10

_generate_transformFunction · 0.85
__init__Method · 0.85
_get_style_dictMethod · 0.85
_write_clipsMethod · 0.85
draw_markersMethod · 0.85
draw_path_collectionMethod · 0.85
draw_imageMethod · 0.85
_draw_text_as_pathMethod · 0.85
_draw_text_as_textMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…