8000 TST: Use consistent float-to-str formatting. · matplotlib/matplotlib@14d4808 · GitHub
[go: up one dir, main page]

Skip to content

Commit 14d4808

Browse files
committed
TST: Use consistent float-to-str formatting.
1 parent 5a40d14 commit 14d4808

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/testing/jpl_units/UnitDblFormatter.py

Lines changed: 3 additions & 3 deletions
39
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def __call__( self, x, pos = None ):
3636
if len(self.locs) == 0:
3737
return ''
3838
else:
-
return str(x)
39+
return '{:.12}'.format(x)
4040

4141
def format_data_short( self, value ):
4242
"Return the value formatted in 'short' format."
43-
return str(value)
43+
return '{:.12}'.format(value)
4444

4545
def format_data( self, value ):
4646
"Return the value formatted into a string."
47-
return str(value)
47+
return '{:.12}'.format(value)

0 commit comments

Comments
 (0)
0