GnuPlot Tutorial on MacOS X || Installation and Plotting Graphs using GNUPLOT - 2021

Опубликовано: 13 Июнь 2026
на канале: Shreedip Kaini
13,145
131

Let's use GNUplot to plot graphs from your large data files right in your terminal. I am using MacBook Air M1 in this tutorial but it works fine for many MacOS X devices.
The commands are almost the same for Windows and Linux except for the installation command and "changing directory" command.
you can use gnuplot command in any operating system as long as you know you are on correct directory.

links:
homebrew:
https://brew.sh

(direct command to install homebrew:)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Hom...)"

sunspot database (used in demo):
https://wwwbis.sidc.be/silso/datafiles

.
commands used in tutorial:

pwd - print work directory (tells you your current location on your device)
cd - change directory
clear - to clear terminal

gnuplot - to activate gnuplot
exit - to exit gnuplot

plot - to plot any equation
e.g.:
plot sin(x)
plot "name_of_your.file"

plot "name_of_your_file" using 1:2 with lines

set xlabel "name_of_xaxis"
set ylabel "name-of_yaxis"
set title "your_title"

you can also use:
set grid
set xtics


replot - to replot the graph with latest commands

set terminal png - to set terminal type to png
set output "name_of_file_you_want_to_create"
replot

unset output

.
Thank you for watching. Make sure to follow / Subscribe for more. comment what video you want next.