Plot window not responding

后端 未结 10 1866
北恋
北恋 2020-12-04 09:17

I\'m using Windows 7 64 bit. Each time, I\'m using plot function, plot windows will shows and draws successfully, but after that it stops responding and must shut down it.

相关标签:
10条回答
  • 2020-12-04 09:52

    The problem is likely to be the graphics toolkit which your installation of Octave is using.

    To check this, type graphics_toolkit in the Octave command line.

    If the response is fltk and your plot window is freezing, then switch the default toolkit to gnuplot: graphics_toolkit('gnuplot')

    Test that the problem is fixed: x=1:10; y=x.^2; plot(x,y)

    Make the change permanent in your octave.rc file, located in your Octave installation directory:

        On Windows:  \Octave\share\octave\site\m\startup\octaverc
        On Linux:     ~/.octaverc
    


    Still not working?

    • If response is qt, try either fltk or gnuplot (one may be faster than the other).

    • If the above does not work, you may need to install/re-install gnuplot. (thanks to lukas and saurabh for this edge case).

    0 讨论(0)
  • 2020-12-04 09:52

    Oh. My friend shows me this command and it works fine :

    pkg rebuild -noauto oct2mat

    The command reinstalls the package but marks it to not load by default at startup. This behavior has now been changed and new releases of Forge packages will NOT load by default.

    The problem is that the package oct2mat should never be loaded. It shadows several functions of Octave core so it starts acting weird. Unless you really have a need for this package you better off just removing it.

    The purpose of oct2mat is to make up for the lack of missing functions in Matlab and make code written for Octave run in Matlab. If you don't need oct2mat, remove it. No one needs all packages installed, and it can actually make your Octave install worse such as in the case of oct2mat.

    0 讨论(0)
  • 2020-12-04 09:54

    I had the same problem in version 4.0.3 and switching the default toolkit to gnuplot as Assad Ebrahim said did not work for me. Then I find something in Octave for Microsoft Windows:

    Current octave for windows ships a not full featured gnuplot. Therefore you cannot use the full features of gnuplot graphics toolkit

    And there is instruction of how to download and install gnuplot. Hope it is helpful to you.

    0 讨论(0)
  • 2020-12-04 09:59

    I had same problem, Sometimes linspace is showing you all results in command windows and waits for your interaction. add ; after command, or hit q to quit in command window x = linspace(0,10,100);

    Permanent solution, edited

    Disable paging of screen output by putting more off into octave command window. This will prevent code to wait until you see all rows.

    If you want turn this back on, use more on

    documentation

    Related questions

    prevent-user-interaction-on-command-window-for-octave

    Can't stop execution in gui command window

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