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
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
setenv("GNUTERM","qt")
in your octave command prompt, it should solve the problem.