Scilab 图背景颜色

Scilab Figure Background Color

我最近开始使用 Scilab,总的来说它可以很好地替代 MATLAB。 困扰我的一件事是图形背景颜色。子图的第一个背景色总是灰色,接下来的是白色。我可以使用图形选项或轴手柄更改白色的,但这似乎不适用于每个图形的第一个子图。这是一个错误还是我做错了什么?

(示例代码没什么特别的:)

x=0:10
y=x

figure
subplot(3,1,1)
plot(x,y)
subplot(3,1,2)
plot(x,y)
subplot(3,1,3)
plot(x,y)

Example Picture

这似乎是 figure 的问题。你最好用scf(),也就是"set current figure":

scf();  //always creates new figure
scf(n); //if window 'n' doesn't exist, it creates it
        //if it exists, it selects it

我自己总是把scf()clf()一起使用,也就是"clear figure"。试试下面的代码,它应该可以正常工作:

x=0:10
y=x

scf(0); clf();
subplot(3,1,1)
plot(x,y)
subplot(3,1,2)
plot(x,y)
subplot(3,1,3)
plot(x,y)