| #!/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 |
| |
| graphStyle = "with linespoints pointsize 0.7" |
| svgTerminal = "set terminal svg dashed size 800, 800 font \"Computer Modern,Tinos,Helvetica,15\"" |
| pngTerminal = "set terminal pngcairo size 800, 800 font \"Computer Modern,Tinos,Helvetica,15\"" |
| |
| 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 |
| # --------------------- |
| set title "Energia per diferents valors d'L" |
| |
| @svgTerminal |
| set output outputfile.'energia.svg' |
| set key bottom right |
| 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 |
| |
| @pngTerminal |
| set output outputfile.'energia.png' |
| replot |
| |
| # ---------------------------- |
| # 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 |