【问题标题】:Is there any way to suppres the output of plot() command in Scilab有什么方法可以抑制 Scilab 中 plot() 命令的输出
【发布时间】:2013-10-18 10:07:31
【问题描述】:

当我们在 scilab 中运行绘图命令时,会打开 0 号图形窗口

x=[1:2:10]
y=[1:2:10]
plot(x,y);

我不想打开这个窗口。如何做到这一点?

我可以更改 scilab 绘图窗口的名称吗?

【问题讨论】:

    标签: scilab


    【解决方案1】:

    开场白

    命令 plot 专门用于打开绘图窗口。那么,如果您在给出绘图命令时不想打开绘图窗口,您的进一步意图是什么。

    设置标题

    要设置情节的标题,您可以在发出情节命令后键入:

    plot(x,y);
    title('Plot title');
    

    要设置窗口的标题,你必须得到一个图形句柄并设置图形名称

    f = gcf(); //Get current figure and store the handle in f
    f.figure_name='My First Window Title'
    

    【讨论】:

    • 谢谢.. 我想在我的应用程序中显示情节。我不想从 scilab 弹出绘图窗口。 Sylvestre 为我提供了答案。
    • 没问题,只是在猜测目标!
    【解决方案2】:

    如果你想在不打开窗口的情况下导出,那就是:

    driver("PNG")
    xinit(TMPDIR+"/foo.png")
    plot3d()
    xend()
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-12
      • 2018-11-03
      • 1970-01-01
      相关资源
      最近更新 更多