How to add an image(.fig) in figure?
5 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have the .fig image of west of india. I have to display that image inside the errorBar plot. I tried the following code I could not get the output.
Can any one help me to clear this?
load trees
[x1,map1]= imread('C:\Users\divecha21\Desktop\errorBar\west_india_map_1.tif')
subplot(1,2,1), subimage(x1,map1)
Thank you.
0 件のコメント
回答 (1 件)
Image Analyst
2015 年 2 月 25 日
It looks like you have a TIF image, not a .fig file. Is that true? If so, is it a gray scale image, an RGB image, or an indexed image with a colormap stored along with it?
if map1 is empty, do this:
imshow(x1);
title('west_india_map_1.tif', 'FontSize', 25);
If map1 is not empty, do this:
imshow(x1);
colormap(map1);
colorbar;
title('Indexed Image', 'FontSize', 25);
1 件のコメント
Image Analyst
2015 年 2 月 25 日
Just noticed that you tagged it as matlab 2012 and imshow was only in the Image Processing Toolbox up until R2014b when it was added to base MATLAB. If you don't have the Image Processing Toolbox, use image() instead of imshow().
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!