In an effort to share some source code (but without taking the time to explain it), here’s some Java source code that I just used to create a JFreeChart chart/graph of some data that I use in my Android football game:
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
Use MacPorts or Homebrew to install Gnuplot on Mac OS X systems:
port install gnuplot brew install gnuplotBack to top
Sample data files
My examples use the following 2-column and 4-column data files:Back to top
My new favorite website (ITHare.com) has this terrific infographic that demonstrates that all CPU operations are not equal.
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 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.”