The tiledlayout function can do this in a relatively straightforward manner. LD = load(websave('A','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1262340/A.mat'));
A = LD.A
A =
CO CO2 O2 T_bred
__ ______ ______ ______
0 3.8976 20.96 25
0 3.8316 20.952 25
0 3.8046 20.928 25
0 3.7943 20.919 25
0 3.7947 20.914 25
0 3.7846 20.91 25
0 3.7678 20.906 25
0 3.7533 20.902 25
0 3.7325 20.9 25
0 3.7083 20.899 25
0 3.6821 20.891 25
0 3.6572 20.877 25
0 3.6352 20.854 25
0 3.6148 20.829 25
0 3.5977 20.806 25
0 3.5807 20.783 25
tiledlayout(1,2, 'TileSpacing','none')
set(gca, 'XDir','reverse')
I am not certain what you want to do, however this should get you started.
EDIT — (13 Jan 2023 at 16:54)
Sorting ‘T_bred’ and plotting against it —
As = sortrows(A,4)
As =
CO CO2 O2 T_bred
__ ______ ______ ______
0 3.8976 20.96 25
0 3.8316 20.952 25
0 3.8046 20.928 25
0 3.7943 20.919 25
0 3.7947 20.914 25
0 3.7846 20.91 25
0 3.7678 20.906 25
0 3.7533 20.902 25
0 3.7325 20.9 25
0 3.7083 20.899 25
0 3.6821 20.891 25
0 3.6572 20.877 25
0 3.6352 20.854 25
0 3.6148 20.829 25
0 3.5977 20.806 25
0 3.5807 20.783 25
tiledlayout(1,2, 'TileSpacing','none')
set(gca, 'XDir','reverse')
[T_bredU,idx] = unique(A.T_bred, 'sort');
tiledlayout(1,2, 'TileSpacing','none')
set(gca, 'XDir','reverse')
This plots
and
as fuctions of ‘T_bred’ sorted by ‘T_bred’. My code is otherwise unchanged. Where do you want to go from here (since I do not understand what you want to do)?
[T_bredMax,maxidx] = max(A.T_bred)
tiledlayout(1,2, 'TileSpacing','none')
plot(A.T_bred(idx1),A.O2(idx1))
plot(A.T_bred(idx1),A.CO2(idx1))
plot(A.T_bred(idx2),A.O2(idx2))
plot(A.T_bred(idx2),A.CO2(idx2))
set(gca, 'XDir','reverse')
tiledlayout(1,2, 'TileSpacing','none')
plot(A.T_bred(idx1),A.O2(idx1))
plot(A.T_bred(idx1),A.CO2(idx1))
plot(A.T_bred(idx2),A.O2(idx2))
plot(A.T_bred(idx2),A.CO2(idx2))
Axr.YAxis.Visible = 'off';
This looks like it could approach what you want. I cannot turn off the y-axis ticks on the right plot (in the centre here), even thougu that should be possible. I am not certain how to deal with the x-axis tick values or labels, so I left them as they are.
.