/gnuplot

How to use gnuplot

Primary LanguageGnuplot

gnuplot

=======

$ gnuplot

Change Terminal

- Aqua Terminal

gnuplot> set term aqua

- EPS(monochrome)

gnuplot> set term postscript eps enhanced size 12cm,12cm
gnuplot> set output "/gnuplot/file.eps"

- png

gnuplot> set term png size 640,480
gnuplot> set output "gnuplot/file.png"

Examples

- Use contour.table

gnuplot> set term postscript eps color enhanced size 12cm,12cm
gnuplot> load "gnuplot/function.plt"
gnuplot> set output "/gnuplot/file.eps"
gnuplot> plot "gnuplot/function.table" with line, "gnuplot/1,1.txt" us 2:3 w lp lw 1 ps 1

Edit function.plt

$ vim function.plt
# 凡例
set key
# function.table を作る
set table "gnuplot/function.table"
splot function(x,y)
unset table

- (Multi) Histogram

load "gnuplot/histogram.plt"
plot "gnupot/plot.txt" us 2 ($0*3+0):2:xtic(1) with boxes title "Name1", "/gnuplot_plot.txt" us ($0*3+1):3 with histogram title "Name2"

- Line

load "gnuplot/line.plt"
plot "/gnuplot/plot.txt" using 1:2 w l lw 2 title "Name"