Как добавить метки в точках или над столбцами на графике с помощью Numo :: Gnuplot - PullRequest
0 голосов
/ 11 мая 2019

Я хочу добавить метки над каждой полосой графика.

Я пытался: 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]
...