Scilab图背景色

卢克

我最近开始使用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)

示例图片

路易斯帕洛尔

这似乎是一个问题figure您最好使用scf(),它是“设置当前数字”:

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

我自己总是scf()与一起使用clf(),这是“清晰的数字”。试试下面的代码,它应该可以正常工作:

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)

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章