Database Reference
In-Depth Information
$ < data/immigration.csv csvcut -c Period,Denmark,Netherlands,Norway,Sweden |
> header -d | tr , ' ' | feedgnuplot --terminal 'dumb 80,25' --lines \
> --autolegend --domain --legend 0 "Denmark" --legend 1 "Netherlands" \
> --legend 2 "Norway" --legend 3 "Sweden" --xlabel "Period" --unset grid --exit
250000 ++-----%%%-------+-------+--------+-------+-------+--------+------++
+ %%%% + % + + + + + Denmark+****** +
|%% % Netherlands ###### |
| % Norway $$$$$$ |
200000 ++ % Sweden %%%%%%++
| $ % |
| $ $ % |
| $ $ % |
150000 ++ $$ $ % ++
| $ $ % |
| $ $ % |
100000 ++$ $ % ++
|$ $ %%%%%%%%%% |
| $ % |
| *********** $$$$$$$$$$$% |
50000 +**** #########** $%% ####### ++
| #### ******** $$% ### ## |
|## ******## ##$$$$$$$$$$$$# |
+ + + + **###########$$************* +
0 ++------+--------+-------+--------*************---+--------+------++
1890 1900 1910 1920 1930 1940 1950 1960 1970
Period
Summary
Both Rio with ggplot2 and feedgnuplot with Gnuplot have their advantages. The
plots generated by Rio are obviously of much higher quality. ggplot2 offers a consis‐
tent and concise syntax that lends itself well for the command line. The only down-
side would be that the output is not directly viewable from the command line. This is
where feedgnuplot may come in handy. Each plot has roughly the same command-
line arguments. As such, it would be straightforward to create a small Bash script that
would make generating plots from and for the command line even easier. After all,
with the command line having such a low resolution, we don't need a lot of flexibility.
Further Reading
• Wickham, H. (2009). ggplot2: Elegant Graphics for Data Analysis . Springer.
• Janert, P. K. (2009). Gnuplot in Action . Manning Publications.
• Tukey, J. W. (1977). Exploratory Data Analysis . Pearson.
Search WWH ::




Custom Search