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