blob: a1a1ae869bbf5984c69f8f6a7e9076893d358e7c [file] [log] [blame]
#!/usr/bin/env -S gnuplot -c
outputfile = 'data_out/dep_en_L_graphs/' # Nom de la imatge resultant (sense extensió)
datafilepre = 'data_out/dep_en_L/tmpdata/'
datafilepost = '.dat'
LS = ARG1
svgTerminal = "set terminal svg dashed size 800, 800 font \"Computer Modern,Tinos,Helvetica,15\"; pointSize=0.5"
pngTerminal = "set terminal pngcairo size 800, 800 font \"Computer Modern,Tinos,Helvetica,15\"; pointSize=0.7"
graphStyle = "with linespoints pointsize pointSize"
set style line 101 lc rgb '#808080' lt 1 lw 1
set border 3 front ls 101
set tics nomirror out scale 0.75
set style line 102 lc rgb '#d6d7d9' lt 0 lw 1
set grid back ls 102
set xlabel "Temperatura (K)"
set yrange [*<0:0<*]
# ------------------------------------
# Gràfica per la capacitat calorífica:
# ------------------------------------
set title "Capacitat calorífica per diferents valors d'L"
@svgTerminal
set output outputfile.'capacitat_calorifica.svg'
plot for [L in LS] datafilepre . L . datafilepost using 2:10 @graphStyle title "L = ".L
@pngTerminal
set output outputfile.'capacitat_calorifica.png'
replot
# ----------------------------------------
# Gràfica per la susceptibilitat magnètica
# ----------------------------------------
set title "Susceptibilitat magnètica per diferents valors d'L"
@svgTerminal
set output outputfile.'susceptibilitat_magnetica.svg'
plot for [L in LS] datafilepre . L . datafilepost using 2:11 @graphStyle title "L = ".L
@pngTerminal
set output outputfile.'susceptibilitat_magnetica.png'
replot
# ---------------------
# Gràfica per l'energia
# ---------------------
do for [IDX = 0:1] {
if (IDX == 0) {
@svgTerminal
set output outputfile.'energia.svg'
} else {
@pngTerminal
set output outputfile.'energia.png'
}
set multiplot
set origin 0, 0
set size 1, 1
set title "Energia per diferents valors de L"
set xlabel "Temperatura (K)"
set key bottom right
set key noopaque
set autoscale x
set yrange [*<0:0<*]
unset object 1
plot for [L in LS] datafilepre . L . datafilepost using 2:($3/(L**2)) @graphStyle title "<E>/N, L = ".L, \
for [L in LS] datafilepre . L . datafilepost using 2:(-sqrt($4)/(L**2)) @graphStyle title "-sqrt(<E^2>)/N, L = ".L
set origin 0.1, 0.525
set size 0.6, 0.4
set title ""
set xlabel ""
set key off
set xrange [2.25:2.5]
set yrange [-1.6:-1.1]
set object 1 rectangle from graph 0,0 to graph 1,1 behind fillcolor rgb 'white' fillstyle solid noborder
replot
unset multiplot
}
set origin 0, 0
set size 1, 1
set autoscale x
set yrange [*<0:0<*]
set xlabel "Temperatura (K)"
unset object 1
# ----------------------------
# Gràfica per la magnetització
# ----------------------------
set title "Magnetització per diferents valors d'L"
@svgTerminal
set output outputfile.'magnetitzacio.svg'
set key top right
plot for [L in LS] datafilepre . L . datafilepost using 2:($7/(L**2)) @graphStyle title "<|M|>/N, L = ".L, \
for [L in LS] datafilepre . L . datafilepost using 2:(sqrt($8)/(L**2)) @graphStyle title "sqrt(<M^2>)/N, L = ".L
@pngTerminal
set output outputfile.'magnetitzacio.png'
replot