フィギュアのouterpositionプロパティを特定のハンドルを持つフィギュアに割り当てる方法はありますか?
たとえば、図を図1のように定義したい場合は、次を使用します。
figure(1)
imagesc(Arrayname) % I.e. any array
コードを使用して、フィギュアのプロパティを変更することもできます。
figure('Name', 'Name of figure','NumberTitle','off','OuterPosition',[scrsz(1) scrsz(2) 700 700]);
図1として割り当てられた図にouterpositionプロパティを割り当てるために使用できるプロパティ名はありますか?
これを尋ねる理由は、(MATLABファイル交換からの)save2wordというコマンドを使用して、作成した関数のプロットをワードファイルに保存しているためです。また、開いている図の数を制限したいためです。これを行います。
私が持っている残りのコードは次のとおりです。
plottedloops = [1, 5:5:100]; % Specifies which loops I want to save
GetGeometry = getappdata(0, 'GeometryAtEachLoop') % Obtains a 4D array containing geometry information at each loop
NumSections = size(GetGeometry,4); %Defined by the fourth dimension of the 4D array
for j = 1:NumSections
for i = 1:plottedloops
P = GetGeometry(:,:,i,j);
TitleSize = 14;
Fsize = 8;
% Save Geometry
scrsz = get(0,'ScreenSize'); %left, bottom, width height
figure('Name', 'Geometry at each loop','NumberTitle','off','OuterPosition',[scrsz(1) scrsz(2) 700 700]); This specifies the figure name, dims etc., but also means multiple figures are opened as the command runs.
% I have tried this, but it doesn't work:
% figure(0, 'OuterPosition',[scrsz(1) scrsz(2) 700 700]);
imagesc(P), title('Geometry','FontSize', TitleSize), axis([0 100 0 100]);
text(20,110,['Loop:',num2str(i)], 'FontSize', TitleSize); % Show loop in figure
text(70,110,['Section:',num2str(j)], 'FontSize', TitleSize);% Show Section number in figure
save2word('Geometry at each loop'); % Saves figure to a word file
end
終わり
ありがとう