[Eps] fixed size of the axis



Hello,

I am a newfie in matlab and I do not find what I need. I would like to
know if there is an easy to fixed the size of the axis in my output
(eps).

I have a 3D volume f(nx,ny,nz) [xx(nx), yy(ny) and zz(nz) are the
cartesien's positions] and would like to represente some slices at
position iX,iY,iZ in 3 figures. In addition I would like to have the
same size of the Y axis in figure 2 and 3 knowing that xx(end) differes
from yy(end). If I have correctly understood the default size of the
output is 6 inch x 8 inch so I have tried using PaperPosition with some
scale coefficient to adjust the output size of the postscript but it
does not give me what I want.

You will find my piece of code below.

Any help is welcome, thanks in advance, sincerely your,

L'apprenti Débutant


figure(1)
ImageZ=squeeze(f(:,:,iZ));
imagesc(yy,xx,ImageZ,caxis), colorbar;
axis image;

figure(2)
ImageY=permute(squeeze(f(:,iY,:)),[2 1]);
imagesc(xx,zz(1:iZmax),ImageY(1:iZmax,:),caxis);
axis image
PositionFigure=get(2,'Position');
PositionPapier=get(2,'PaperPosition');

figure(3)
ImageX=permute(squeeze(f(iX,:,:)),[2 1]);
imagesc(yy,zz(1:iZmax),ImageX(1:iZmax,:),caxis);
axis image

PositionFigure(3) = yy(end)*PositionFigure(3)/xx(end);
PositionPapier(3) = yy(end)*PositionPapier(3)/xx(end);
set(3,'Position',PositionFigure);
set(3,'PaperPosition',PositionPapier);

saveas(1,['Zcut=' num2str(iY) '.eps'], 'psc2')
saveas(2,['Ycut=' num2str(iY) '.eps'], 'psc2')
saveas(3,['Xcut=' num2str(iY) '.eps'], 'psc2')

.