MCPcopy Index your code
hub / github.com/pydata/xarray / _nicetitle

Function _nicetitle

xarray/plot/facetgrid.py:46–56  ·  view source on GitHub ↗

Put coord, value in template and truncate at maxchar

(coord, value, maxchar, template)

Source from the content-addressed store, hash-verified

44
45
46def _nicetitle(coord, value, maxchar, template):
47 """
48 Put coord, value in template and truncate at maxchar
49 """
50 prettyvalue = format_item(value, quote_strings=False)
51 title = template.format(coord=coord, value=prettyvalue)
52
53 if len(title) > maxchar:
54 title = title[: (maxchar - 3)] + "..."
55
56 return title
57
58
59def _auto_grid(

Callers

nothing calls this directly

Calls 2

format_itemFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…