How to reset (set back) hold on/off to its original value?
8 次查看(过去 30 天)
显示 更早的评论
One of my function generates some plots, and I want to set hold on or off at the end of the function.
回答(2 个)
Tim Jackman
2015-9-18
If you just use "hold" it will toggle the hold state, so if hold is on, it will turn it off and vice versa.
"hold on" turns on the hold state and "hold off" turns it off.
0 个评论
Image Analyst
2015-9-19
There is no documented way of determining the original hold state, at least that I could find. Why do you feel you need to determine the original state? It's probably not necessary. You should know the way you want to leave your plot, and just set it accordingly.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!