Skip to content

Commit

Permalink
convert to f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
m-reuter committed Dec 15, 2024
1 parent 1cce152 commit f793019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lapy/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _get_colorval(t, colormap):
# compute new color via linear interpolation
cval = np.rint(rv1 + tt * (rv2 - rv1)).astype(int)
# format as string again
cstr = "rgb(%d, %d, %d)" % (cval[0], cval[1], cval[2])
cstr = f"rgb({cval[0]:d}, {cval[1]:d}, {cval[2]:d})"
return cstr


Expand Down

0 comments on commit f793019

Please sign in to comment.