A collection of erubis templates for plotting with R and ruby.
You’ll need to install R:
# ubuntu
sudo apt-get install R
For mac os x try: http://cran.r-project.org/bin/macosx/. If the mac installer doesn’t already, symlink the Rscript
executable to /usr/bin/Rscript
.
Once R is installed, install ggplot2.
Rprompt$: install.packages("ggplot2")
Provided are some examples of using the templates with Swineherd. All examples make use of the configliere gem, thus using --help
as an option should print options specific to that plot example.
./xyplot.rb --points --width=800 --title="Henon Map" --point_size=0.01 data/henon.tsv
./histogram.rb data/frequency.tsv
./logloghist.rb data/frequency.tsv
./worldmap.rb --lat=2 --lon=3 data/airports.tsv
Often it is the case you’ve got timeseries of the form:
201006 1234
201007 5678
...
This transforms the month field into something R can understand and plots it with the right scaling.
./monthseries.rb --month=2 --y=3 --xlab="Month" --ylab="Passengers in + Passengers out" data/passengers_in_out_lax_airpt.tsv
More are on the way.