Visualizzazione post con etichetta data manipulation. Mostra tutti i post
Visualizzazione post con etichetta data manipulation. Mostra tutti i post

How make quick histogram using gnuplot [data elaboration]

Make an histogram using gnuplot isn't very simple if you have raw data (not collected in classes).
Here we show a quick and easy way to create and draw an histogram using gnuplot starting from raw data.

This is the command you have to use:

bw = 2   #substitute what you want
bin(x,width)=width*floor(x/width)
plot 'data.dat' using (bin($2,bw)):(1.0) smooth freq with boxes

And this is the output:



file "data.dat" exemple:
1 1
2 3
4 12
5 6
.....

[Via: http://www.nabble.com/gnuplot-histograms-td15811193.html]

Istogramma con gnuplot [elaborazione dati]

Vista la difficoltà nel reperire online questa informazione, in una toccata e fuga, la ripubblico qui.

Ecco come generare un istogramma con gnuplot partendo dai dati "grezzi" (non elaborati e raccolti in classi)

bw = 2 # substitute what you want
bin(x,width)=width*floor(x/width)
plot 'data.dat' using (bin($2,bw)):(1.0) smooth freq with boxes

file data.dat:
1 404
2 400
4 408
5 406


[Via: http://www.nabble.com/gnuplot-histograms-td15811193.html]