Hi everyone,
Ok so I think this was a common problem to many people, as they were trying to save a plot on image with its native resolution. I found out a solution to this, it's working fine for me. I'll post it so that you can use it if you need it. Here it is:
I = imread('data0012.tif'); % Load a sample image
imshow(I); % Display it
[r,c,d] = size(I); % Get the image size
set(gca,'Units','normalized','Position',[0 0 1 1]); % Modify axes size
set(gcf,'Units','pixels','Position',[200 200 c r]); % Modify figure size
hold on;
plot(Z{12}(1,:),Z{12}(2,:),'rx',hat_X{12}(1,:),hat_X{12}(3,:),'co'); % Plot something over the image
f = getframe(gcf); % Capture the current window
imwrite(f.cdata,'data12.tif'); % Save the frame data
Enjoy
Jimmy
|