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

后端 未结 6 1781
灰色年华
灰色年华 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:37

    AFAIK, the plot window is a child process of octave and therefor can only be displayed when octave is running. Even if you plot something from the "interactive" mode leave the plot open and close octave, the plot will also disappear.
    What you could do is to plot to some output file like posted here:

    f = figure
    set(f, "visible", "off")
    plot([1,2,3,4])
    print("MyPNG.png", "-dpng")
    

提交回复
热议问题