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

Diretório 'gnuplot' com exemplos de geração de gráficos a partir de tabelas de 2 e 3 colunas.

parent 199953f8
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/gnuplot -c
# Execute o comando:
# ./plot.gp < arquivo_dados
#
# Arquivo de dados recebido pela STDIN deve conter 2 colunas:
# eixo x = coluna 1 = tamanho em Bytes
# eixo y = coluna 2 em diante = indicadores
#
# Gerando gráfico a partir de tabela
set ylabel "FLOPS-DP (MFlops/s)"
set xlabel "N (bytes)"
set style data point
set style function line
set style line 1 lc 3 pt 7 ps 0.3
set terminal qt title "N x FLOPS\_DP"
plot '< cat -' using 1:2 ls 1 notitle with linespoint
pause mouse
# Gerando figura PNG
set terminal png
# set output "NxFLOPS_DP.png"
## plot '< cat -' using 1:2 ls 1 notitle
## replot
# unset output
File added
#!/usr/bin/gnuplot -c
set grid
set style data point
set style function line
set style line 1 lc 3 pt 7 ps 0.3
set boxwidth 1
set xtics
set xrange ["0":]
set xlabel "N (bytes)"
#
# ALTERNATIVA 1: Tabelas em arquivos separados (2 colunas)
#
set ylabel "<metrica 1>"
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
#
# ALTERNATIVA 2: Tabela com 3 colunas
#
set ylabel "<metrica 1>"
set title "<campo[marcador 1]>"
set terminal qt 1 title "<campo[marcador 1]>"
plot 'plot_exemplo-03.dat' using 1:2 title "<sem otimização>" with linespoints, \
'' using 1:3 title "<com otimização>" with linespoints
pause mouse
# Gerando figura PNG
set terminal png
set output "funcao__NxMetrica.png"
plot 'plot_exemplo-03.dat' using 1:2 title "<sem otimização>" with linespoints, \
'' using 1:3 title "<com otimização>" with linespoints
replot
unset output
# Marcador "matPtrVet"
# n <METRICA 1> (sem otimização)
64 0.5
100 50.433210629261
128 25.798359943835
2000 27.337482595053
2048 18.873424079086
# Marcador "matPtrVet"
# n <METRICA 1> (com otimização)
64 0.5
100 45.433210629261
128 21.798359943835
2000 21.337482595053
2048 14.873424079086
# Marcador "matRowVet" <METRICA 1>
# n sem_otimz. com_otimiz.
64 0.7 0.7
100 50.433210629261 45.433210629261
128 25.798359943835 21.798359943835
2000 27.337482595053 21.337482595053
2048 18.873424079086 14.873424079086
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment