Octave for macOS: Difference between revisions

Jump to navigation Jump to search
→‎Homebrew: Overhaul section.
(→‎Homebrew: Overhaul section.)
Line 29: Line 29:
'''Install GNU Octave using Homebrew:'''
'''Install GNU Octave using Homebrew:'''


* Install [https://developer.apple.com/xcode/ Xcode] via the '''Mac App Store'''.
# Install [https://developer.apple.com/xcode/ Xcode] via the '''Mac App Store'''.
** Install the '''Command Line Tools''' by [https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac opening a terminal] and type <code>sudo xcode-select --install</code>.
#* Install the '''Command Line Tools''' by [https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac opening a terminal] and type <pre>sudo xcode-select --install</pre>
* Follow [https://brew.sh/ Homebrew's installation instructions].
# Follow [https://brew.sh/ Homebrew's installation instructions].
* Ensure brew itself has the latest definitions by running <code>brew update</code> in the terminal.
# Ensure brew itself has the latest definitions <pre>brew update</pre>
# Install Octave <ref>Homebrew has updated some of its scripts. To install Octave as of May 14, 2020, provide the migrated full path by running <code>brew install homebrew/core/octave</code> instead. [Citation needed!]</ref><pre>brew install octave</pre>


Then, we install Octave
==== Further reading ====
<ref>Homebrew has updated some of its scripts. To install Octave as of May 14, 2020, provide the migrated full path by running <code>brew install homebrew/core/octave</code> instead. [Citation needed!]</ref>:
<pre>brew install octave</pre>


The default charting package in Octave is straight qt. However, on the Mac gnuplot often works better. To switch to gnuplot, place the following text in your ~/.octaverc file:
The default charting package in Octave is straight qt. However, on the Mac gnuplot often works better. To switch to gnuplot, place the following text in your {{Path|~/.octaverc}} file:
<pre>setenv('GNUTERM','qt')
<pre>setenv('GNUTERM','qt')
graphics_toolkit("gnuplot")</pre>
graphics_toolkit("gnuplot")</pre>
Line 54: Line 53:
brew link --overwrite ghostscript
brew link --overwrite ghostscript
</pre>
</pre>
Then run the brew install command again for octave.
Then run the <code>brew install octave</code> command again.


Note: If brew complains about not having a formula for octave, the following command should fix it:
Note: If brew complains about not having a formula for octave, the following command should fix it:

Navigation menu