gnuplot/ y값 범위 다른 3개 이상 그래프 겹쳐 그리기

set xrange [0:15]
set xlabel 'Monkhorst Pack : K' 
set nokey

set multiplot 

set lmargin screen 0.4 ## y label 이 여러개 들어갈 수 있는 자리를 만들어 주는 작업!

### 'Elapsed time (sec)'
set ytics nomirror
set yrange [6:42]
set ytics offset  0, 0
set ylabel offset 0, 0
set ylabel 'Elapsed time (sec)' textcolor rgb "red"
plot "prac1.dat" u 1:2 with line lt rgb "red"

### 'lattice constant'
set ytics nomirror
set yrange [0.5320:0.53625]
set ytics offset  -8, 0
set ylabel offset -8, 0
set ylabel 'lattice constant * 5.43 (angstroms)' textcolor rgb "blue"
plot "prac1.dat" u 1:3 with line lt rgb "blue"


###free energy (eV)
set ytics nomirror
set yrange [-11:-10.15]
set ytics offset -20, 0
set ylabel offset -20, 0
set ylabel 'free energy (eV)' textcolor rgb "green"
plot "prac1.dat" u 1:4 with line lt rgb "green"

set terminal png
set output 'prac1.png'
replot
unset multiplot
set terminal wxt 

Leave a Reply