Octave does not plot

PlotOctave

Plot Problem Overview


When I try to plot a graph on GNU Octave, and try to use plot, it gives me the following output

set terminal aqua enhanced title "Figure 1" size 560 420  font "*,6" dashlength 1
                  ^
     line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list

I am using Mac OS X 10.9.2. I have tried using

octave:79> setenv("GNUTERM","X11")

but I still get the same error.

Plot Solutions


Solution 1 - Plot

setenv("GNUTERM","qt") in your octave command prompt, it should solve the problem.

Solution 2 - Plot

I think your problem comes from using the CLI.

As of January 2, 2014. If you're using OS/X 10.9 (Maverics) then you can opt to use integrated GUI from the binary package by downloading the Octave 3.8.0 .dmg. Use Octave-gui not Octave-cli, or otherwise start the GUI from the CLI.

A note about the gui from The Octave Home Page

>But because it is not quite as polished as we would like, we have decided to wait until the 4.0.x release series before making the GUI the default interface (until then, you can use the --force-gui option to start the GUI).

Solution 3 - Plot

The following worked out for me

  1. Uninstall any existing gnuplot on your OSX

brew uninstall gnuplot

  1. Install gnuplot with either X or X11

    brew install gnuplot --with-x

  2. Finally, set the GNUTERM to X11

    setenv("GNUTERM","X11")

Solution 4 - Plot

And if you need Aqua terminal instead of X11 - this might help:

brew uninstall --force gnuplot

brew install gnuplot --with-aquaterm --with-qt4

You don't need to add setenv("GNUTERM","X11") or add GNUTERM env.var to octaverc file.

Solution 5 - Plot

I've got this problem too and solved by installing an Aquaterm for mac as mentioned here.

p.s. If you get warnings like "warning: could not match any font: *-normal-normal-10" as I did, try to check your /usr/local/etc/fonts/fonts.conf

Solution 6 - Plot

To install it without aquaterm:

brew cask install xquartz
brew install gnuplot --with-x
brew install octave

vim ~/.octaverc
setenv("GNUTERM", "X11")
graphics_toolkit("gnuplot");

Solution 7 - Plot

I got the same problem when using Octave-cli, and I just avoid this by using "Octave-gui".

Solution 8 - Plot

Download and install Aquaterm.

sudo wget https://gist.githubusercontent.com/tuvistavie/8466870/raw/9064b4b3dfb3644950b6f5745056f54f8d6e56c6/gnuplot.rb -O /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gnuplot.rb

brew uninstall gnuplot
brew update && brew upgrade
brew tap homebrew/science
brew info gnuplot

brew reinstall gnuplot --aquaterm --qt --test

worked for me ref

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser2472071View Question on Stackoverflow
Solution 1 - PlotCheng LongView Answer on Stackoverflow
Solution 2 - PlotwaTeimView Answer on Stackoverflow
Solution 3 - PlotDesta Haileselassie HagosView Answer on Stackoverflow
Solution 4 - PlotAnthony AkentievView Answer on Stackoverflow
Solution 5 - PlotLeon.ZView Answer on Stackoverflow
Solution 6 - PlotlaktakView Answer on Stackoverflow
Solution 7 - PlotliamleeView Answer on Stackoverflow
Solution 8 - PlotpavanView Answer on Stackoverflow