Imagesc and superimpose 2 .mat files (of unequal sizes) with different colormaps

조회 수: 1 (최근 30일)
Ankit Sahay
Ankit Sahay . 2021년 3월 2일
댓글: KALYAN ACHARJYA . 2021년 3월 2일
Hi everybody,
I have two mat files (vort & flame_deg) and their corresponding coordinate data. vort -> xv, yv & flame_deg -> xf,yf. All the mat files have been attached.
Both the mat files are of different dimensions, but they overlap in a certain range, as is evident from the xv, yv, xf & yf files. I want to plot vort in the background with some colormap (eg. parula), and plot flame_deg in the foreground with a different colormap (eg. hot). A large portion of values in flame_deg (foreground data) has NaN elements. which I would like to keep as 100% transparent.
If I plot the .mat files using the following commands:
ax1 = axes;
hold on;
ax2 = axes;
ax2.Visible = 'off';
linkprop([ax1 ax2],'Position');
linkaxes([ax1 ax2])
I get something like this:
As it can be seen, a large portion of the foreground image has NaN values, which I would like to be completely transparent so that I can see the background vort image. The choice of colormaps is an entirely different topic, I will resolve it later. I do not want to keep either of the colormaps as grayscale.
I have gone though tons of examples present on the different forums (MATLAB answers, StackExchange) like this, this, this, this etc. Unfortunately, none of them worked. It may be that one of them might have the answer that I am looking for and I am too dumb to find it, or that none of them have addressed this issue so far.
I request someone to help me solve this issue. Thank you.
  댓글 수: 2

댓글을 달려면 로그인하십시오.

답변 (0개)


Help CenterFile Exchange에서 Red에 대해 자세히 알아보기




Community Treasure Hunt

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

Start Hunting!

Translated by