Skip to content
Snippets Groups Projects
Commit f5d98595 authored by Armando Luiz Nicolini Delgado's avatar Armando Luiz Nicolini Delgado :nerd:
Browse files

/* * Em gnuplot: alterar exemplos de plotagem para mostrar:

     - posicionamento de legendas
     - Curvas de diferentes tabelas em um mesmo gráfico
     - definir cores de curvas
     - Como plotar tabelas com colunas separadas por ',' ou por ' ' (espaço)
  * Em utils.c:
    - tipo double para tempo substituído pelo typedef 'rtime_t' (vide utils.h)
*/
parent bead7386
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/gnuplot -c
## set encoding iso_8859_15
set encoding utf
set terminal qt persist
# set terminal qt persist
set grid
set style data point
set style function line
set style line 1 lc 3 pt 7 ps 0.3
......@@ -14,17 +18,24 @@ set xlabel "N (bytes)"
#
# ALTERNATIVA 1: Tabelas em arquivos separados (2 colunas)
#
set key center center # posição da legenda: center, left, right
set datafile separator comma
set ylabel "<metrica 1>"
set logscale x
set title "<campo[marcador 1]>"
set terminal qt 0 title "<campo[marcador 1]>"
plot 'plot_exemplo-01.dat' title "<sem otimização>" with linespoints, \
'plot_exemplo-02.dat' title "<com otimização>" with linespoints
plot 'plot_exemplo-01.dat' using 1:2 title "<sem otimização>" lc rgb "green" with linespoints, \
'' using 1:3 title "<com otimização>" lc rgb "blue" with linespoints, \
'plot_exemplo-02.dat' title "<com avx>" lc rgb "red" with linespoints
pause -1
#
# ALTERNATIVA 2: Tabela com 3 colunas
#
set key outside right # posição da legenda: outside {left | right}
unset logscale x
set datafile separator whitespace
set ylabel "<metrica 1>"
set title "<campo[marcador 1]>"
set terminal qt 1 title "<campo[marcador 1]>"
......
# Marcador "matPtrVet"
# n <METRICA 1> (sem otimização)
64 0.5
100 50.433210629261
128 25.798359943835
2000 27.337482595053
2048 18.873424079086
64,1.1,0.5
100,50.433210629261,45.433210629261
128,25.798359943835,21.798359943835
2000,27.337482595053,21.337482595053
2048,18.873424079086,14.873424079086
# Marcador "matPtrVet"
# n <METRICA 1> (com otimização)
64 0.5
100 45.433210629261
128 21.798359943835
2000 21.337482595053
2048 14.873424079086
64,0.8
100,35.433210629261
128,18.798359943835
2000,25.337482595053
2048,10.873424079086
......@@ -8,7 +8,7 @@
Forma de uso:
double tempo;
rtime_t tempo;
tempo = timestamp();
<trecho de programa do qual se deseja medir tempo>
tempo = timestamp() - tempo;
......@@ -55,7 +55,7 @@ int isPot2(int n)
Forma de uso:
double tempo;
rtime_t tempo;
tempo = timestamp();
<trecho de programa do qual se deseja medir tempo>
tempo = timestamp() - tempo;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment