After twice wasting an hour or so installing Octave for the Stanford Machine Learning class, I decided I should jot this down for posterity or anyone else in a similar position. This should give you a working Octave install that plays nice with Gnuplot. (Most of this comes from Octave’s wiki with help from a StackOverflow post or two.)
Instead of using the Octave installation package as recommended in the course notes (this results in the problems we’re trying to avoid), I’ll be installing Octave via Homebrew, which fixed a lot of my initial install problems.
If you haven’t already, you’ll need to install Xcode (free in the Mac App Store) and the Command Line Tools. Once you’ve installed Xcode, you can install Command Line Tools in Xcode > Preferences > Downloads.
You’ll also need to install XQuartz, so go ahead and download and install that now.
Next, open up a Terminal and do the following:
you might need to install legacy Java 6 runtime
Last, you need to edit your .octaverc file to get gnuplot to play nicely with Octave. So, in your home directory, create a new .octaverc file and paste the following:
I’m pretty sure that should get you up and running, but in case I missed a step, feel free to send me an email or fix it for me.