Hello,
I need to overlay two images in Matlab to get a similar picture (as attached), generated using Petrel.
I have two data sets: x1,y1,z1 and x2,y2,z2 with regular 2D grid. How to use pcolor or similar functions to overlay two images? Note that the colormap for two images should be different.
Thanks, Alexander

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 2 Jul. 2015

0 Stimmen

Starting from R2014b you can use different colormaps for different images. Before that you can use the File Exchange contribution freezeColors to get the truecolor version of a pseudocolor image. If you have suitable data you can also use ind2rgb() .
Once you have multiple image data arrays, you can image() them, possibly specifying XData and YData if they are not to exactly overlay each other. You can set the AlphaData property of the image() objects in order to blend the two together.

1 Kommentar

Alexander Rozhko
Alexander Rozhko am 2 Jul. 2015
Thank you for the comment. I found already other solution for Matlab 2012b version. I am using freezeColors.m function, which I uploaded from this website.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by