gnuplot -e 'set terminal pngcairo; set output "log.png"; set logscale y; set datafile separator ","; plot "data.csv" using 2:4 with lines'

Category: Data Science & Analysis

gnuplot -e 'set terminal pngcairo; set output "log.png"; set logscale y; set datafile separator ","; plot "data.csv" using 2:4 with lines'

Plot with a logarithmic y axis

The set logscale y command switches the y axis to a logarithmic scale, which straightens exponential growth and widens small-value detail. Use set logscale x or set logscale xy for the other axis variants. Data values must be positive, since logarithms of zero or negatives are undefined. Log axes are standard for financial and growth data.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.