Use floating point number to format integer labels in plot - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年07月31日 11:25:23 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年07月31日 11:25:23 +0200
commit23e5174f22419bf6c5cf7a52c412c4ec3641a1e8 (patch)
treeb012de7bc4ed957867b124b45cef410889d06d00
parent64e594860a92fdd912d08398baf1ad4b013068a8 (diff)
downloadgsl-shell-23e5174f22419bf6c5cf7a52c412c4ec3641a1e8.tar.gz
Use floating point number to format integer labels in plot
Diffstat
-rw-r--r--agg-plot/units.cpp 2
1 files changed, 1 insertions, 1 deletions
diff --git a/agg-plot/units.cpp b/agg-plot/units.cpp
index c3a6b1d8..8113c153 100644
--- a/agg-plot/units.cpp
+++ b/agg-plot/units.cpp
@@ -65,7 +65,7 @@ void units::mark_label (char *lab, unsigned size, int mark) const
if (nb_decimals == 0)
{
- snprintf (lab, size, "%d", int(mark * dmajor));
+ snprintf (lab, size, "%.0f", mark * dmajor);
lab[size-1] = '0円';
}
else
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月17日 20:25:22 +0000

AltStyle によって変換されたページ (->オリジナル) /