gnuplot -e 'set terminal pngcairo; set output "hist.png"; set datafile separator ","; plot "data.csv" using 4 smooth frequency with boxes'

Category: Data Science & Analysis

gnuplot -e 'set terminal pngcairo; set output "hist.png"; set datafile separator ","; plot "data.csv" using 4 smooth frequency with boxes'

Draw a histogram of column 4 with boxes

The smooth frequency modifier bins identical column 4 values and counts them, and with boxes renders the counts as a bar chart. This turns raw values into a frequency histogram without any preprocessing. The using 4 specifier selects the field to count. Bin the data yourself with mlr histogram when you need custom bin widths.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.