为 gnuplot 数据标签设置精度
Set precision for gnuplot data labels
我想在箱线图的同时绘制数据标签:
plot ARG2 using 1:2 with boxes lc rgb "blue" notitle,\
"" u 1:2:3 with labels notitle
列 </code> 的精度为 <strong>8</strong> 个小数位,但我只想打印 <strong>3</strong> 个小数位。 </p>
<p>我试过使用 floor 函数但是它不起作用:</p>
<pre><code>"" u 1:2:(floor(*1e3)/1e3) with labels notitle
plot "whatever" using 1:2:(sprintf("%.3f",)) with labels
我想在箱线图的同时绘制数据标签:
plot ARG2 using 1:2 with boxes lc rgb "blue" notitle,\
"" u 1:2:3 with labels notitle
列 </code> 的精度为 <strong>8</strong> 个小数位,但我只想打印 <strong>3</strong> 个小数位。 </p>
<p>我试过使用 floor 函数但是它不起作用:</p>
<pre><code>"" u 1:2:(floor(*1e3)/1e3) with labels notitle
plot "whatever" using 1:2:(sprintf("%.3f",)) with labels