Índice
-
- INF 5010: Otimização combinatória
- INF 5016: Algoritmos avançados
- INF 5023: Técnicas de busca heurística.
Esta é uma versão antiga do documento!
Here are two examples of using gnuplot to visualize graphs in the style of Edward R. Tufte (see The Visual Display of Quantitative Information).
The first is a quartile plot from page 125. The data file has entries
x minimum lower-quartile median upper-quartile maximum
A quartile plot combines two vectors plots for the lower and upper quartile and a point plot:
#!/usr/bin/gnuplot
set term svg
set output "tufte.svg"
unset border
set noxtics
set noytics
plot [0:11] [0:10] "./tufte.dat" using 1:2:(0):($3-$2) with vectors nohead ls -1 notitle,\
"" using 1:5:(0):($6-$5) with vectors nohead ls -1 notitle,\
"" using 1:4 with points pt 7 ps 0.75 lt -1 notitle
The result is
The next plot shows the development of the earth's surface temperature. The data is from the NASA Goddard Institute for Space Studies. Each line containts
year minimum average maximum
The graph again combines a vector plot to show the total range and a point plot for the averages. Note the rangelimit option for the axes.
#!/usr/bin/gnuplot
set term svg enh
set output "monthly-averages.svg"
set title "Surface temperature from 1850-2009"
set ylabel "Different to average 1961-1990 [{}^oC]"
set xlabel "Year"
set border 3 front linetype -1 linewidth 1.000
set xtics border in nomirror rangelimit
set ytics border in nomirror rangelimit
plot "./monthly-averages.dat" using 1:2:(0):($4-$2) with vec nohead lt -1 notit, "" using 1:3 w p lt 1 ps 0.6 pt 7 notit