执行时:
x=1:100;
figure(1)
title('Sobel software execution scalability')我获得:

但是,当我策划某事时,执行例如:
x=1:100;
figure(1)
title('Sobel software execution scalability')
plot(x)结果是另一个:

这个数字是存在的,但标题却消失了。我做错了什么?
我找到的解决方案是添加hold on
x=1:100;
figure(1)
title('Sobel software execution scalability')
hold on
plot(x)但听起来真的很奇怪。是否有可能我需要一直添加hold on?如果我需要更改图形运行时怎么办?
请注意,编写这几行代码只是为了在主机上复制错误。
发布于 2018-01-23 11:39:27
答案是:在plot之后打印标题。否则,情节将覆盖以前的数字上的内容。
https://stackoverflow.com/questions/48400654
复制相似问题