我想在图表的每个条形上方添加标签。
我尝试过: gnuplot.run'podpis(col)= sprintf(“%d”,$ 7)'
并添加第二个数据系列,否则,但我不记得了
嗯,也: 7:xtic(1):xticlabels(...)
require 'numo/gnuplot'
gnuplot = Numo::Gnuplot.new
gnuplot.set ylabel: 'Procent przechwyconych pakietów'
gnuplot.set xlabel: 'Długość pakietów'
gnuplot.set grid: true
gnuplot.set :style, :fill, :solid
gnuplot.set boxwidth:0.4
gnuplot.set yrange:0..60
gnuplot.run 'podpis(col) = sprintf("%d",$7)'
gnuplot.plot ['dane.txt', using: '7:xtic(1)', with: :boxes] #,
#['dane.txt', using: '7:xtic(1):(podpis(7)) with labels', notitle: true]