How to add an image(.fig) in figure?

3 vues (au cours des 30 derniers jours)
alagu mathi
alagu mathi le 25 Fév 2015
Commenté : Image Analyst le 25 Fév 2015
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.

Réponses (1)

Image Analyst
Image Analyst le 25 Fév 2015
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 commentaire
Image Analyst
Image Analyst le 25 Fév 2015
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().

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by