Octave plotting error

前端 未结 8 1671
情歌与酒
情歌与酒 2020-12-14 22:11

I am new to octave, I just tried my first plotting with Octave 3.4.0 when I get the following error. Any help will be much appreciated. The gnuplot version is 4.6

         


        
相关标签:
8条回答
  • 2020-12-14 23:00

    or put this line into your .profile (or .zshrc whatever):

    export GNUTERM=x11
    

    this will make all gunplot invokations (besides Octave) to output to x11.

    0 讨论(0)
  • 2020-12-14 23:02

    Ok, I found the solution to this problem. Just run:

    setenv("GNUTERM","X11")
    

    Before you plot anything, e.g.,

    plot(x,y)
    
    0 讨论(0)
  • 2020-12-14 23:03

    I added:

    setenv("GNUTERM", "qt")
    

    to the octaverc file located in /usr/local/octave/3.8.0/share/octave/3.8.0/m/startup, and then it worked again.

    0 讨论(0)
  • 2020-12-14 23:04

    Also you could add this line to your ~/.octaverc file:

    setenv GNUTERM x11
    

    - it works for me on mac os mountain lion.

    0 讨论(0)
  • 2020-12-14 23:06

    Just add:

    setenv ("GNUTERM", "X11")
    

    to your octaverc file, normally located at /usr/local/share/octave/site/m/startup

    0 讨论(0)
  • 2020-12-14 23:16

    COMPLETE SOLUTION:

    1- Install x11:

    brew cask install xquartz
    

    Or, install from here.

    2- Reinstall gnuplot:

    brew uninstall gnuplot && brew install gnuplot --with-x11
    

    3- Put these lines in ~/.octaverc

    setenv("GNUTERM", "x11")
    gnuplot_binary("/usr/local/bin/gnuplot")
    

    4- Restart your mac

    0 讨论(0)
提交回复
热议问题