avm99963 | 802583e | 2022-05-12 10:56:56 +0200 | [diff] [blame] | 1 | #!/usr/bin/env -S gnuplot -c |
Adrià Vilanova Martínez | 24d8701 | 2022-06-16 00:29:59 +0200 | [diff] [blame^] | 2 | outputfile = 'diferent_t' # Nom de la imatge resultant (sense extensió) |
| 3 | datafilepre = 'SIM-L-32-TEMP-' |
avm99963 | 802583e | 2022-05-12 10:56:56 +0200 | [diff] [blame] | 4 | datafilepost = '-MCTOT-10000.out' |
| 5 | L=32 |
| 6 | TEMPS="1500 1800 2500 3500 4500" |
| 7 | |
Adrià Vilanova Martínez | 24d8701 | 2022-06-16 00:29:59 +0200 | [diff] [blame^] | 8 | do 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 | } |
avm99963 | 802583e | 2022-05-12 10:56:56 +0200 | [diff] [blame] | 16 | |
Adrià Vilanova Martínez | 24d8701 | 2022-06-16 00:29:59 +0200 | [diff] [blame^] | 17 | set multiplot layout 2,1 |
| 18 | set key outside top horizontal |
avm99963 | 802583e | 2022-05-12 10:56:56 +0200 | [diff] [blame] | 19 | |
Adrià Vilanova Martínez | 24d8701 | 2022-06-16 00:29:59 +0200 | [diff] [blame^] | 20 | set xlabel "Iteracions MC" |
| 21 | set ylabel '$\langle e \rangle$' |
| 22 | set yrange [-2:0] |
| 23 | plot for [T in TEMPS] datafilepre . T . datafilepost using 1:($2/(L*L)) with lines title sprintf("T = %.1f", (T+0.0)/1000) |
| 24 | |
| 25 | set xlabel "Iteracions MC" |
| 26 | set ylabel '$\langle m \rangle$' |
| 27 | set yrange [-1:1] |
| 28 | plot for [T in TEMPS] datafilepre . T . datafilepost using 1:($3/(L*L)) with lines title sprintf("T = %.1f", (T+0.0)/1000) |
| 29 | |
| 30 | unset multiplot |
| 31 | } |