How can Draw multiple squares in same slice with different dimensions

1 Ansicht (letzte 30 Tage)
Hi
please i have tree data arrays and i need draw them as pictuer below, three squares with different three dimensions squars in one slice.
i tried the following code but provide me with different slices!
% all data Set1
clear all;
XY0 = [
25.3803 25.3802 25.382 25.3786
25.3809 25.3796 25.3811 25.3774
25.3796 25.3804 25.3785 25.3783
25.3803 25.3817 25.3792 25.3794
]
%data set2
XY1 = [
25.3533 25.3543 25.3555 25.354
25.3545 25.3546 25.3533 25.3569
25.3536 25.3544 25.3536 25.3559
25.3507 25.3537 25.3525 25.3544
]
min1=min(XY0,[],'all');
max1=max(XY0,[],'all');
color_range = [min1 max1];
figure(1);figure('NumberTitle', 'off', 'Name', 'the Cores temp.');
subplot(2,1,1), surf(XY0), axis on, caxis( color_range ), colormap(jet);colorbar
axis([1 4 1 4 22 26]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
min1=min(XY1,[],'all');
max1=max(XY1,[],'all');
color_range = [min1 max1];
figure(1);figure('NumberTitle', 'off', 'Name', 'the Cores temp.');
subplot(2,1,1), surf(XY1), axis on, caxis( color_range ), colormap(jet);colorbar
axis([1 4 1 4 22 26]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %data set3
XY2 = [
25.6176 25.6172 25.6174 25.617
25.6176 25.6171 25.6173 25.6168
25.6175 25.6172 25.617 25.6169
25.6176 25.6174 25.6171 25.6171
]
min1=min(XY2,[],'all');
max1=max(XY2,[],'all');
color_range = [min1 max1];
figure(1);figure('NumberTitle', 'off', 'Name', 'the Cores temp.');
subplot(2,1,1), surf(XY2), axis on, caxis( color_range ), colormap(jet);colorbar
set(gcf, 'PaperPosition', [1 1 7 30])
axis([1 4 1 4 22 26]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by