Multiple x axis labels and ranges
Afficher commentaires plus anciens
Hello everyone,
I would like to make a plot of 3 arrays of data into one figure. The y axis shows the depth in cm and the x axis should show the thickness of the layers, the density of the layers and the particle size of the layers. The particle size ranges from 0 to 31, the density from 1 to 1.4 and the thickness of the layers from 0 to 3. I would like to show the labels of every different data type with different colours. Also they should be same width. The plot that I have now causes the density to almost be a straight verticle line.
Depth_SW_N_LLM=0:0.1:8.2;
Depth_SW_N_LLM=Depth_SW_N_LLM';
TL_SW_N_LLM=zeros(83,1); %Thickness Layers
TL_SW_N_LLM(1:21,1)=2;
TL_SW_N_LLM(22:27,1)=0.6;
TL_SW_N_LLM(28:41,1)=1.4;
TL_SW_N_LLM(42:54,1)=1.3;
TL_SW_N_LLM(54:83,1)=2.9;
D_SW_N_LLM=zeros(83,1); %Density Layers
D_SW_N_LLM(1:21,1)=1;
D_SW_N_LLM(22:27,1)=1.0466;
D_SW_N_LLM(28:41,1)=1.0498;
D_SW_N_LLM(42:54,1)=1.2659;
D_SW_N_LLM(54:83,1)=1.34269;
PS_SW_N_LLM=zeros(83,1); %PS Layers
PS_SW_N_LLM(1:21,1)=0;
PS_SW_N_LLM(22:27,1)=16.755;
PS_SW_N_LLM(28:41,1)=17.276;
PS_SW_N_LLM(42:54,1)=35.87;
PS_SW_N_LLM(54:83,1)=30.897;
SW_N_L_Matrix=[Depth_SW_N_LLM,TL_SW_N_LLM,D_SW_N_LLM,PS_SW_N_LLM];
figure
plot(SW_N_L_Matrix(:,2),SW_N_L_Matrix(:,1))
set(gca, 'YDir','reverse')
set(gca, 'XAxisLocation', 'top')
hold on
plot(SW_N_L_Matrix(:,3),SW_N_L_Matrix(:,1))
hold on
plot(SW_N_L_Matrix(:,4),SW_N_L_Matrix(:,1))
set(gca, 'XTIck', [0:5:30])
grid on
Could anyone please help me to make a nice plot out of this?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Axis Labels dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
