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

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f31ddd2

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

17 files changed

+389
-477
lines changed

lib/matplotlib/testing/jpl_units/UnitDblFormatter.py

Lines changed: 3 additions & 3 deletions
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:
39-
return str(x)
39+
return '{:.12g}'.format(x)
4040

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

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

0 commit comments

Comments
 (0)
0