Import figure with subplots
2 次查看(过去 30 天)
显示 更早的评论
Hi there,
simple question. I want to import a figure which is made of a number of subplots and does something with it. How to handle that? I mean, how to access each single subplot and modify something in a loop, for instance?
Cheers. C
0 个评论
采纳的回答
Jan
2011-3-28
FigH = hgload(FigFileName);
% EDITED: 'flat' without leading '-'
AxesList = findobj(get(FigH, 'Children'), 'flat', 'Type', 'axes');
% If there are additional AXES objects in the figure,
% which are no SubPlot's use an additional property
% to exclude/include them in the FINDOBJ command.
for aAxes = reshape(AxesList, 1, [])
set(aAxes, 'Color', rand(1, 3));
end
0 个评论
更多回答(1 个)
Chiara Modenese
2011-3-28
3 个评论
Jan
2011-3-28
Which label do you mean? XTick labels, X-/Y-labels, titles, or do you have text labels inside the plots?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!