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.