Esta página mostra as diferenças entre as duas revisões da página.
| Ambos os lados da revisão anterior Revisão anterior Próxima revisão | Revisão anterior | ||
|
tufte [2010/01/28 20:24] marcus |
tufte [2010/04/01 19:41] (Actual) marcus |
||
|---|---|---|---|
| Linha 1: | Linha 1: | ||
| ==== On Tuftefying gnuplot ==== | ==== On Tuftefying gnuplot ==== | ||
| - | Here are two examples of using [[http://www.gnuplot.info|gnuplot]] to visualize graphs in the style of Edward R. Tufte (see [[http://www.edwardtufte.com/tufte/books_vdqi|The Visual Display of Quantitative Information]]). | + | Here are four examples of using [[http://www.gnuplot.info|gnuplot]] to visualize graphs in the style of Edward R. Tufte (see [[http://www.edwardtufte.com/tufte/books_vdqi|The Visual Display of Quantitative Information]]). |
| === Quartile plot === | === Quartile plot === | ||
| Linha 51: | Linha 51: | ||
| {{:monthly-averages.png}} | {{:monthly-averages.png}} | ||
| + | |||
| + | === Bar chart === | ||
| + | Here is the redesigned bar chart at the bottom of page 127. The data are simple y-values, one per line: | ||
| + | <code> | ||
| + | value | ||
| + | </code> | ||
| + | and | ||
| + | <code> | ||
| + | #!/usr/bin/gnuplot | ||
| + | set term svg enh | ||
| + | set output "barchart.svg" | ||
| + | unset xtics | ||
| + | set style line 1 linecolor rgbcolor "white" lw 2 | ||
| + | set style line 2 linecolor rgbcolor "#808080" lw 2 | ||
| + | set border 1 ls 2 | ||
| + | set ytics 5,5,15 border nomirror format "%.0f%%" font "Times_New_Roman,18" textcolor rgbcolor "black" offset -2 out scale 2.0 | ||
| + | set grid front ls 1 | ||
| + | plot [-1:11.25] [0:20] "barchart.dat" using 0:1:(0.5) with boxes fill solid 1.4 noborder ls 2 notitle | ||
| + | </code> | ||
| + | produces | ||
| + | |||
| + | {{:barchart.png?480}} | ||
| + | |||
| + | === Dot-dash-plot === | ||
| + | |||
| + | And finally, a dot-dash-plot in the style of p. 133. (The data are xy value pairs). | ||
| + | |||
| + | <code> | ||
| + | #!/usr/bin/gnuplot -persist | ||
| + | set term svg enh | ||
| + | set output "dotdash.svg" | ||
| + | unset border | ||
| + | set xtics textcolor rgb "white" out nomirror | ||
| + | set ytics textcolor rgb "white" out nomirror | ||
| + | set offsets 0.005, 0, 0, 1 | ||
| + | plot "dotdash.dat" using 1:2:xtic(1):ytic(sprintf("%f",$2)) pt 7 ps 1 notitle | ||
| + | </code> | ||
| + | |||
| + | produces | ||
| + | |||
| + | {{:dotdash.png}} | ||
| <html> | <html> | ||