Getting octave to plot when invoking a function from the command line

后端 未结 6 1800
灰色年华
灰色年华 2020-12-06 13:14

I am trying to run a function in octave from the command line. The function is currently run like so:

octave --silent --persist --eval \'functio

6条回答
  •  忘掉有多难
    2020-12-06 13:52

    You need to select a proper graphics toolkit:

    available_graphics_toolkits 
    ans = 
    {
      [1,1] = fltk
      [1,2] = gnuplot
    }
    

    The default is fltk which cannot write to file without displaying the plot. However, if you select gnuplot it will be able to write to file without displaying it first. In your file start with:

    graphics_toolkit gnuplot
    

提交回复
热议问题