avm99963 | 45a8a46 | 2022-06-04 12:41:03 +0200 | [diff] [blame] | 1 | #!/usr/bin/env -S gnuplot -c |
Adrià Vilanova Martínez | c102e96 | 2022-06-04 23:53:44 +0200 | [diff] [blame] | 2 | outputfile = 'data_out/dep_en_L_graphs/' # Nom de la imatge resultant (sense extensió) |
| 3 | datafilepre = 'data_out/dep_en_L/tmpdata/' |
avm99963 | 45a8a46 | 2022-06-04 12:41:03 +0200 | [diff] [blame] | 4 | datafilepost = '.dat' |
Adrià Vilanova Martínez | c102e96 | 2022-06-04 23:53:44 +0200 | [diff] [blame] | 5 | LS = ARG1 |
avm99963 | 45a8a46 | 2022-06-04 12:41:03 +0200 | [diff] [blame] | 6 | |
Adrià Vilanova Martínez | d2f8c71 | 2022-06-05 22:41:03 +0200 | [diff] [blame] | 7 | graphStyle = "with linespoints pointsize 0.7" |
| 8 | svgTerminal = "set terminal svg dashed size 800, 800 font \"Computer Modern,Tinos,Helvetica,15\"" |
| 9 | pngTerminal = "set terminal pngcairo size 800, 800 font \"Computer Modern,Tinos,Helvetica,15\"" |
avm99963 | 45a8a46 | 2022-06-04 12:41:03 +0200 | [diff] [blame] | 10 | |
Adrià Vilanova Martínez | d2f8c71 | 2022-06-05 22:41:03 +0200 | [diff] [blame] | 11 | set xlabel "Temperatura (K)" |
| 12 | set yrange [*<0:0<*] |
| 13 | # ------------------------------------ |
| 14 | # Gràfica per la capacitat calorífica: |
| 15 | # ------------------------------------ |
| 16 | set title "Capacitat calorífica per diferents valors d'L" |
Adrià Vilanova Martínez | c102e96 | 2022-06-04 23:53:44 +0200 | [diff] [blame] | 17 | |
Adrià Vilanova Martínez | d2f8c71 | 2022-06-05 22:41:03 +0200 | [diff] [blame] | 18 | @svgTerminal |
| 19 | set output outputfile.'capacitat_calorifica.svg' |
| 20 | plot for [L in LS] datafilepre . L . datafilepost using 2:10 @graphStyle title "L = ".L |
Adrià Vilanova Martínez | c102e96 | 2022-06-04 23:53:44 +0200 | [diff] [blame] | 21 | |
Adrià Vilanova Martínez | d2f8c71 | 2022-06-05 22:41:03 +0200 | [diff] [blame] | 22 | @pngTerminal |
| 23 | set output outputfile.'capacitat_calorifica.png' |
| 24 | replot |
| 25 | |
| 26 | # ---------------------------------------- |
| 27 | # Gràfica per la susceptibilitat magnètica |
| 28 | # ---------------------------------------- |
| 29 | set title "Susceptibilitat magnètica per diferents valors d'L" |
| 30 | |
| 31 | @svgTerminal |
| 32 | set output outputfile.'susceptibilitat_magnetica.svg' |
| 33 | plot for [L in LS] datafilepre . L . datafilepost using 2:11 @graphStyle title "L = ".L |
| 34 | |
| 35 | @pngTerminal |
| 36 | set output outputfile.'susceptibilitat_magnetica.png' |
| 37 | replot |
| 38 | |
| 39 | # --------------------- |
| 40 | # Gràfica per l'energia |
| 41 | # --------------------- |
| 42 | set title "Energia per diferents valors d'L" |
| 43 | |
| 44 | @svgTerminal |
| 45 | set output outputfile.'energia.svg' |
Adrià Vilanova Martínez | c102e96 | 2022-06-04 23:53:44 +0200 | [diff] [blame] | 46 | set key bottom right |
Adrià Vilanova Martínez | d2f8c71 | 2022-06-05 22:41:03 +0200 | [diff] [blame] | 47 | plot for [L in LS] datafilepre . L . datafilepost using 2:($3/(L**2)) @graphStyle title "<E>/N, L = ".L, \ |
| 48 | for [L in LS] datafilepre . L . datafilepost using 2:(-sqrt($4)/(L**2)) @graphStyle title "-sqrt(<E^2>)/N, L = ".L |
Adrià Vilanova Martínez | c102e96 | 2022-06-04 23:53:44 +0200 | [diff] [blame] | 49 | |
Adrià Vilanova Martínez | d2f8c71 | 2022-06-05 22:41:03 +0200 | [diff] [blame] | 50 | @pngTerminal |
| 51 | set output outputfile.'energia.png' |
| 52 | replot |
| 53 | |
| 54 | # ---------------------------- |
| 55 | # Gràfica per la magnetització |
| 56 | # ---------------------------- |
| 57 | set title "Magnetització per diferents valors d'L" |
| 58 | |
| 59 | @svgTerminal |
| 60 | set output outputfile.'magnetitzacio.svg' |
Adrià Vilanova Martínez | c102e96 | 2022-06-04 23:53:44 +0200 | [diff] [blame] | 61 | set key top right |
Adrià Vilanova Martínez | d2f8c71 | 2022-06-05 22:41:03 +0200 | [diff] [blame] | 62 | plot for [L in LS] datafilepre . L . datafilepost using 2:($7/(L**2)) @graphStyle title "<|M|>/N, L = ".L, \ |
| 63 | for [L in LS] datafilepre . L . datafilepost using 2:(sqrt($8)/(L**2)) @graphStyle title "sqrt(<M^2>)/N, L = ".L |
| 64 | |
| 65 | @pngTerminal |
| 66 | set output outputfile.'magnetitzacio.png' |
| 67 | replot |