We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents da309ec + 651df81 commit 471b914Copy full SHA for 471b914
lib/matplotlib/backends/backend_ps.py
@@ -88,22 +88,8 @@ def _get_papertype(w, h):
88
return 'a0'
89
90
91
-def _num_to_str(val):
92
- if isinstance(val, str):
93
- return val
94
-
95
- ival = int(val)
96
- if val == ival:
97
- return str(ival)
98
99
- s = "%1.3f" % val
100
- s = s.rstrip("0")
101
- s = s.rstrip(".")
102
- return s
103
104
105
def _nums_to_str(*args):
106
- return ' '.join(map(_num_to_str, args))
+ return " ".join(f"{arg:1.3f}".rstrip("0").rstrip(".") for arg in args)
107
108
109
def quote_ps_string(s):
0 commit comments