How can I change the size of 100+ plots?

1 次查看(过去 30 天)
Ryan
Ryan 2012-12-20
I have several hundred plots that someone else generated and I need to put into a document. I have a function that will take the current figure and copy it into word so that isn't the problem. The problem is changing the properties of all the figures such that they all look the same. I've tried this:
[FILE,PATH]=uigetfile('*.fig','Select the Data Set','MultiSelect','on');
if ~iscell(FILE)
FILE = {FILE};
end
for i=1:length(FILE);
fname = [PATH,FILE{i}];
h = openfig(fname);
get(gcf,'Position')
set(gcf,'Position',[1 1 1000 600]);
get(gcf,'Position')
%add stuff to export to word
end
But the set command doesn't seem to do anything. What am I doing wrong?
[EDITED, Jan, code formatted]
  1 个评论
Jan
Jan 2012-12-20
编辑:Jan 2012-12-20
@Ryan: You have check your question and registered, that the code looked ugly. Then You have posted the code again in the answer section. Although this is not the standard method, you found a workaround to improve the readability of your question. Thanks, Ryan!
Therefore this is my question of the week.
(This is meant seriously. You can find thousands of carelessly written questions in this forum. Therefore you made my day.)
After I've inserted the missing empty lines before and after the code, I've removed the answer.

请先登录,再进行评论。

回答(1 个)

Ryan
Ryan 2012-12-20
Shoot, I don't know why but now my original code works.
  1 个评论
Jan
Jan 2012-12-20
Perhaps you have edited the code and did not save it. Then the former version runs.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by