How do we concatenate two imagesc figures ( 2D matrix) into one figure ( one below the other stacked) without any gaps?

4 次查看(过去 30 天)
I have two figures (Fig1 and Fig2): They are two separate imagesc plots.
How do i get a plot of concatenated version of these two plots as shown in concatenated.png( attached) ?
There should not be any gaps between the two plots as we obain in subplot.
code:
figure(4);
imagesc(Rng,Vel,RDM_1);
xlabel('---> Range (m)');ylabel('---> Velocity (m/s)')
title('Range-Doppler Map 1');
figure(5);
imagesc(Rng,Vel,RDM_2);
xlabel('---> Range (m)');ylabel('---> Velocity (m/s)')
title('Range-Doppler Map 2');
I need to concatenate the 2D matrix RDM_1 and RDM_2 one below the other without any gap ( as shown in concatenate.png).
  4 个评论

请先登录,再进行评论。

采纳的回答

Harikrishnan Balachandran Nair
I understand that you are trying to have two 'imagesc' plots stacked vertically, without any gap in between them.
A Possible workaround for this would be to have two 'axes' object defined on the same 'figure' handle , positioned in such a way that they are stacked vertically without any gap in between.
This can be done by adjusting the 'Position' property of the axes object.You can refer to the following code for the same.
fig=figure;
axes1=axes(fig);
axes2=axes(fig);
axes1.Position(1,4)=axes1.Position(1,4)/2;
axes2.Position(1,4)=axes2.Position(1,4)/2;
axes2.Position(1,2)= axes1.Position(1,2)+axes1.Position(1,4);
imagesc(axes1,Rng,Vel,RDM_1);
imagesc(axes2,Rng,Vel,RDM_2);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Environment and Clutter 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by