plot

A collection of Gnuplot examples

I needed to use Gnuplot a little bit over the last few days, mostly to create 2D line charts, and these are my brief notes on how to get started with Gnuplot. If you haven’t used it before, it’s a pretty amazing tool.

Jumping right in ...

Back to top

Installing gnuplot

Use MacPorts or Homebrew to install Gnuplot on Mac OS X systems:

port install gnuplot
brew install gnuplot
Back to top

Sample data files

My examples use the following 2-column and 4-column data files:

Back to top

How to use JavaPlot from the Scala REPL

If you want to use the JavaPlot library from the Scala REPL, it’s pretty easy to get started with. Just download and unpack the JavaPlot distribution and then find the JavaPlot.jar file in the dist directory of the package. Copy that jar file to the current directory, and then start a Scala REPL session like this:

Scalala - A numerical linear algebra library for Scala

Scalala is a numerical linear algebra library for Scala, supporting rich Matlab-like operators on vectors and matrices, and a library of numerical and plotting routines. Scalala takes it inspiration from numerical programming environments such as Matlab and R, that can easily express linear algebra as simple expressions involving matrices, vectors and scalars. However, general purpose programming with richer data structures in these environments ranges from slow to painful. Scalala is designed to marry the syntax of interactive numeric environments, the performance of dedicated linear algebra libraries, and the flexibility of general purpose programming in Scala.”