I have the following code to print a calculated level overlayed to a google earth image.
im = imread('googleEarthImage.png');
figure
imagesc(lon,fliplr(lat),im); set(gca, 'YDir', 'normal');
hold on
pcolor(lon,lat,level); shading flat; axis([min(lon) max(lon) min(lat) max(lat)]);
% Save figure
set(gcf,'InvertHardcopy','on');
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5])
print('level','-dpng','-r300');
The problem with the code is that the printed image won't contain the background google earth image. The google earth image is replaced by a white background. However, when I remove
axis([min(lon) max(lon) min(lat) max(lat)]);
I get the calculated level with the google earth image in the background but it is zoomed out since I can't use axis(). Any help in the right direction is much appreciated. Thanks