Is it possible to disable plot/figure generation in an entire script?
52 次查看(过去 30 天)
显示 更早的评论
This is more of a trivial request, but it would be convenient for me if there was a setting I could change before running a script that simply squelches all figure and plot creation.
Does anyone know if this type of thing exists?
1 个评论
gilles miet
2018-12-7
Hi, In case you know which display functions are called, simply overload them by defing new dummy functions with same name and varargin.
e.g. for plot function:
Create a plot.m in current directory or in any custom path directory as follows:
function plot(varargin)
disp('doing nothing');
end
Ignore matlab warnings telling you you overload a Matlab built-in function (you are doing it on purpose)
When plot is called you get:
>> x=randn(1,10);
>> plot(x)
doing nothing
>>
采纳的回答
Doug Hull
2014-10-27
A sneaky way of kind of sort of doing this is:
set(groot,'defaultFigureVisible','off')
To undo this:
set(groot,'defaultFigureVisible','on')
It means the new figures will be visible off. It kind of does what you are looking for, kind of.
6 个评论
gilles miet
2018-12-7
Hi, see answer to original question: https://fr.mathworks.com/matlabcentral/answers/160265-is-it-possible-to-disable-plot-figure-generation-in-an-entire-script#comment_647687
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!