GNU Octave reports: unknown or ambiguous terminal type in OS X

I am trying to build with Octave and GNUPlot OS X 10.10.5. I have Octave and GNUPlot installed via homebrew, but when I try to build, I get the following error

gnuplot> set terminal aqua enhanced title "Figure 1" size 560 420 font "*,6.66667" dashlength 1 ^ line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list WARNING: Plotting with an 'unknown' terminal. No output will be generated. Please select a terminal with 'set terminal'. 
+5
source share
1 answer

My solution was to install aquaterm, for example.

 brew install Caskroom/cask/aquaterm 

and then do

 brew reinstall gnuplot --with-aquaterm 
+10
source

Source: https://habr.com/ru/post/1233194/