# Gnuplot script to plot data from a file set terminal pngcairo size 800,600 set output "mag_sphere_plot.png" set xlabel "Distance North (m)" set ylabel "Magnetic anomaly (nT)" set title "Magnetic anomaly of sphere" set grid # Use a thin black line for the plot plot "mag_sphere.dat" using 1:3 with lines linecolor rgb "black" linewidth 1 notitle ,\ "mag_sphere.dat" using 1:4 with lines linecolor rgb "red" linewidth 1 notitle