# Ubuntu/Debian
apt-get install gnuplot gnuplot-x11
# CentOS/RHEL
yum install gnuplot
gnuplot
gnuplot> plot sin(x)/x
gnuplot> plot sin(x) title 'Sine', cos(x) title 'Cosine'
gnuplot> splot sin(x*y/20) # 3D 曲面
gnuplot> set terminal pngcairo size 800,600
gnuplot> set output 'plot.png'
gnuplot> replot
# plot.gp
set terminal pngcairo size 1024,768
set output 'benchmark.png'
set title 'Performance Comparison'
set xlabel 'Threads'
set ylabel 'Throughput (ops/s)'
set grid
plot 'data.txt' using 1:2 with linespoints title 'System A', \
'data.txt' using 1:3 with linespoints title 'System B'
# 執行
gnuplot plot.gp
# Ubuntu/Debian
apt-get install maxima wxmaxima # wxMaxima 為圖形介面
# Arch
pacman -S maxima wxmaxima
wxmaxima 進入筆記本介面。(%i1) integrate(x^2*sin(x), x);
(%o1) 2*x*sin(x) - (x^2 - 2)*cos(x)
(%i2) solve([x+y=5, 2*x-y=1], [x,y]);
(%o2) [[x=2, y=3]]
(%i3) taylor(exp(x), x, 0, 5);
(%o3) 1 + x + x^2/2 + x^3/6 + x^4/24 + x^5/120 + ...
(%i4) plot2d([sin(x), cos(x)], [x, -%pi, %pi]); # 呼叫 Gnuplot 繪圖
Maxima 內建 plot2d/plot3d 直接呼叫 Gnuplot 引擎,無需手動切換。複雜數學推導用 Maxima,大數據視覺化用 Gnuplot 腳本。