Skip to content

Commit 4adbffa

Browse files
committed
Always write class with 1 decimal point
1 parent d24da26 commit 4adbffa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mkstyle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def myround(x, y):
3434

3535
# Internals
3636
format_pc = partial(myround, y=digits + 1)
37-
format_class = partial(myround, y=digits)
37+
format_class = partial(myround, y=1)
3838

3939

4040
def parse_arguments():
@@ -50,6 +50,7 @@ print(f"Writing output to {outfp}")
5050
outfh = open(outfp, "w", encoding="utf8")
5151

5252
for i in np.arange(0, 100 + interval, interval):
53+
i = float(i)
5354
class_ = "perc" + format_class(i).replace(".", "-")
5455
i2 = i + (interval / 10)
5556
outfh.write(

0 commit comments

Comments
 (0)