author | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-09-07 06:58:58 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-09-07 07:00:56 UTC |
parent | a6ad7ffe220d9d582037a77e81f704429cd8583f |
gen_plot_data.sh | +4 | -4 |
plot.gpi | +108 | -4 |
diff --git a/gen_plot_data.sh b/gen_plot_data.sh index 8cacdaf..0c91009 100755 --- a/gen_plot_data.sh +++ b/gen_plot_data.sh @@ -15,11 +15,11 @@ declare -A miniter miniter["babilonio"]=1 maxiter["babilonio"]=50 miniter["binomial"]=1 -maxiter["binomial"]=300 +maxiter["binomial"]=200 # mas, da NaN miniter["binomial_inc"]=1 -maxiter["binomial_inc"]=300 -miniter["binomial_dec"]=10 -maxiter["binomial_dec"]=300 +maxiter["binomial_inc"]=200 # mas, da NaN +miniter["binomial_dec"]=1 +maxiter["binomial_dec"]=600 miniter["fcont"]=1 maxiter["fcont"]=50 miniter["fcont_int"]=1 diff --git a/plot.gpi b/plot.gpi index 75ba28b..3d6f16f 100644 --- a/plot.gpi +++ b/plot.gpi @@ -3,6 +3,29 @@ set terminal png enhanced size 1024,768 set autoscale set style data linespoints +# +# Resultados con precision fija e iteración variable +# + +set xlabel "Iteración" +set ylabel "Resultado" + +set output "plot/todos-result-p:51.png" +set title "Comparativa de resultados con precision 51" +plot [:50] \ + 'out/OUT-fcont-prec:51-err' using 1:3 title "Frac. continuas", \ + 'out/OUT-binomial-prec:51-err' using 1:3 title "Binomial", \ + 'out/OUT-babilonio-prec:51-err' using 1:3 title "Babilonio", \ + sqrt(2) + +set output "plot/todos-result-p:51-sin_binomial.png" +set title "Comparativa de resultados con precision 51 - Detalle" +plot [2.6:11] \ + 'out/OUT-fcont-prec:51-err' using 1:3 title "Frac. continuas", \ + 'out/OUT-babilonio-prec:51-err' using 1:3 title "Babilonio", \ + sqrt(2) + + # # Error con precision fija e iteración variable # @@ -42,6 +65,48 @@ plot [25:] \ 'out/OUT-binomial_inc-prec:51-err' using 1:5 title "Binomial inc", \ 'out/OUT-binomial_dec-prec:51-err' using 1:5 title "Binomial dec" +set output "plot/binomial_dec-err-p:algunos.png" +set title "Binomial dec, distintas precisiones - Error" +set style data lines +plot \ + 'out/OUT-binomial_dec-prec:24-err' using 1:5 title "prec = 24", \ + 'out/OUT-binomial_dec-prec:22-err' using 1:5 title "prec = 22", \ + 'out/OUT-binomial_dec-prec:20-err' using 1:5 title "prec = 20", \ + 'out/OUT-binomial_dec-prec:17-err' using 1:5 title "prec = 17", \ + 'out/OUT-binomial_dec-prec:15-err' using 1:5 title "prec = 15", \ + 'out/OUT-binomial_dec-prec:12-err' using 1:5 title "prec = 12", \ + 'out/OUT-binomial_dec-prec:10-err' using 1:5 title "prec = 10" +set style data linespoints + +set output "plot/binomial_dec-err-p:algunos-detalle1.png" +set title "Binomial dec, distintas precisiones - Error - Detalle 1" +set style data lines +# el 0 esta para mantener los mismos colores que el de arriba +plot [:300] \ + 0 title "", \ + 0 title "", \ + 'out/OUT-binomial_dec-prec:20-err' using 1:5 title "prec = 20", \ + 'out/OUT-binomial_dec-prec:17-err' using 1:5 title "prec = 17", \ + 'out/OUT-binomial_dec-prec:15-err' using 1:5 title "prec = 15", \ + 'out/OUT-binomial_dec-prec:12-err' using 1:5 title "prec = 12", \ + 'out/OUT-binomial_dec-prec:10-err' using 1:5 title "prec = 10" +set style data linespoints + +set output "plot/binomial_dec-err-p:algunos-detalle2.png" +set title "Binomial dec, distintas precisiones - Error - Detalle 2" +set style data lines +# el 0 esta para mantener los mismos colores que el de arriba +plot [:100] \ + 0 title "", \ + 0 title "", \ + 0 title "", \ + 0 title "", \ + 'out/OUT-binomial_dec-prec:15-err' using 1:5 title "prec = 15", \ + 'out/OUT-binomial_dec-prec:12-err' using 1:5 title "prec = 12", \ + 'out/OUT-binomial_dec-prec:10-err' using 1:5 title "prec = 10" +set style data linespoints + + # Fracciones continuas set output "plot/fcont-err-p:51.png" set title "Fracciones continuas con precisión 51 - Error" @@ -57,14 +122,18 @@ plot [3:10] \ # Comparativas +set output "plot/todos-err-p:51.png" +set title "Comparativa con precisión 51 - Error" +plot [:200] \ + 'out/OUT-fcont-prec:51-err' using 1:5 title "Frac. continuas", \ + 'out/OUT-binomial_dec-prec:51-err' using 1:5 title "Binomial dec", \ + 'out/OUT-babilonio-prec:51-err' using 1:5 title "Babilonio" + set output "plot/todos-err-p:51-detalle.png" set title "Comparativa con precisión 51 - Error - Detalle" -plot [25:] \ +plot [:50] \ 'out/OUT-fcont-prec:51-err' using 1:5 title "Frac. continuas", \ - 'out/OUT-fcont_int-prec:51-err' using 1:5 title "Frac. continuas int", \ 'out/OUT-binomial-prec:51-err' using 1:5 title "Binomial", \ - 'out/OUT-binomial_inc-prec:51-err' using 1:5 title "Binomial inc", \ - 'out/OUT-binomial_dec-prec:51-err' using 1:5 title "Binomial dec", \ 'out/OUT-babilonio-prec:51-err' using 1:5 title "Babilonio" @@ -166,6 +235,41 @@ unset zrange unset zlabel set zlabel "Error (logarítmica)" rotate by 90 +# Binomial dec +set title "Binomial dec - Error" +set output "plot/binomial_dec-err-3d.png" +set view 67,138 +splot [:52] 'out/OUT-binomial_dec-all-err' using 2:1:5 with lines palette title "" + +set pm3d map +set output "plot/binomial_dec-err-map.png" +splot [:51] 'out/OUT-binomial_dec-all-err' using 2:1:5 title "" +unset pm3d + +set zlabel "Error (logarítmica, invertida)" rotate by 90 offset -1,0,0 + +set title "Binomial dec - Error - Invertido y detalle" +set output "plot/binomial_dec-err-3d-detalle.png" +set view 62,308 +set grid ztics +set zrange [] reverse +splot [:26] 'out/OUT-binomial_dec-all-err' using 2:1:5 with lines palette title "" +set grid noztics +unset zrange + +set zlabel "Error (logarítmica, invertida)" rotate by 90 offset -5,0,0 +set title "Binomial dec - Error - Invertido y detalle" +set output "plot/binomial_dec-err-3d-detalle2.png" +set view 70,102 +set grid ztics +set zrange [] reverse +splot [10:12] [:80] 'out/OUT-binomial_dec-all-err' using 2:1:5 with lines palette title "" +set grid noztics +unset zrange + +unset zlabel +set zlabel "Error (logarítmica)" rotate by 90 + # Fracciones continuas set title "Fracciones continuas - Error" set output "plot/fcont-err-3d.png"