Lab fenòmens: afegir informe i ultims canvis al codi

Change-Id: I7f01665996295625fc390f9382dd0ba1c9882bbc
diff --git a/quad10/fenomens/lab/p3/Makefile b/quad10/fenomens/lab/p3/Makefile
index 64bd220..d8a0c80 100644
--- a/quad10/fenomens/lab/p3/Makefile
+++ b/quad10/fenomens/lab/p3/Makefile
@@ -10,7 +10,7 @@
 	gfortran -c MC-2.f90
 	gfortran MC-2.o writeconfigseed.o mt19937ar.o magne.o energ.o str.o -o out/mc2
 mt19937ar.o: mt19937ar.f
-	f77 -c mt19937ar.f
+	gfortran -c mt19937ar.f
 writeconfig.o: writeconfig.f90
 	gfortran -c writeconfig.f90
 writeconfigseed.o: writeconfigseed.f90
diff --git a/quad10/fenomens/lab/p3/graphs/different_temp.gnu b/quad10/fenomens/lab/p3/graphs/different_temp.gnu
index 246cc97..78fa35d 100755
--- a/quad10/fenomens/lab/p3/graphs/different_temp.gnu
+++ b/quad10/fenomens/lab/p3/graphs/different_temp.gnu
@@ -1,17 +1,31 @@
 #!/usr/bin/env -S gnuplot -c
-outputfile = 'out_data/diferent_t' # Nom de la imatge resultant (sense extensió)
-datafilepre = 'out_data/SIM-L-32-TEMP-'
+outputfile = 'diferent_t' # Nom de la imatge resultant (sense extensió)
+datafilepre = 'SIM-L-32-TEMP-'
 datafilepost = '-MCTOT-10000.out'
 L=32
 TEMPS="1500 1800 2500 3500 4500"
 
-set terminal svg dashed size 600, 1200 font "Computer Modern,Tinos,Helvetica,15"
-set output outputfile.'.svg'
+do for [IDX = 0:1] {
+  if (IDX == 0) {
+    set terminal cairolatex size 8.5cm, 11cm
+    set output outputfile.'.tex'
+  } else {
+    set terminal svg dashed size 600, 1200 font "Computer Modern,Tinos,Helvetica,15"
+    set output outputfile.'.svg'
+  }
 
-set key outside top horizontal
-set multiplot layout 2,1
+  set multiplot layout 2,1
+  set key outside top horizontal
 
-set title "Energia"
-plot for [T in TEMPS] datafilepre . T . datafilepost using 1:($2/(L*L)) with lines title "T = ".T." mK"
-set title "Magnetització"
-plot for [T in TEMPS] datafilepre . T . datafilepost using 1:($3/(L*L)) with lines title "T = ".T." mK"
+  set xlabel "Iteracions MC"
+  set ylabel '$\langle e \rangle$'
+  set yrange [-2:0]
+  plot for [T in TEMPS] datafilepre . T . datafilepost using 1:($2/(L*L)) with lines title sprintf("T = %.1f", (T+0.0)/1000)
+
+  set xlabel "Iteracions MC"
+  set ylabel '$\langle m \rangle$'
+  set yrange [-1:1]
+  plot for [T in TEMPS] datafilepre . T . datafilepost using 1:($3/(L*L)) with lines title sprintf("T = %.1f", (T+0.0)/1000)
+
+  unset multiplot
+}
diff --git a/quad10/fenomens/lab/p3/mc-1.sh b/quad10/fenomens/lab/p3/mc-1.sh
index bbfc02c..173438e 100644
--- a/quad10/fenomens/lab/p3/mc-1.sh
+++ b/quad10/fenomens/lab/p3/mc-1.sh
@@ -8,4 +8,4 @@
 
   echo
 done
-./graphs/different_temp.gnu
+(cd out_data; ../graphs/different_temp.gnu)