blob: be9b69c8a406495f0e84066979f0a29a4f4eecef [file] [log] [blame]
Adrià Vilanova Martínez24d87012022-06-16 00:29:59 +02001#!/usr/bin/env -S gnuplot -c
2outputfile = 'depEnSeed' # Nom de la imatge resultant (sense extensió)
3datafilepost = '.ev'
4L=32
5SEEDS = ARG1
6L = ARG2
7
8do for [IDX = 0:1] {
9 if (IDX == 0) {
10 set terminal cairolatex size 8.5cm, 11cm
11 set output outputfile.'.tex'
12 } else {
13 set terminal svg dashed size 600, 1200 font "Computer Modern,Tinos,Helvetica,15"
14 set output outputfile.'.svg'
15 }
16
17 set multiplot layout 2,1
18 set key outside top horizontal
19
20 set xlabel "Iteracions MC"
21 set ylabel '$\langle e \rangle$'
22 set yrange [-2:0]
23 plot for [S in SEEDS] S . datafilepost using 1:($2/(L*L)) with lines title sprintf('$S = %s$', S)
24
25 set xlabel "Iteracions MC"
26 set ylabel '$\langle m \rangle$'
27 set yrange [-1:1]
28 plot for [S in SEEDS] S . datafilepost using 1:($3/(L*L)) with lines title sprintf('$S = %s$', S)
29
30 unset multiplot
31}