Temperature with depth graph

5 次查看(过去 30 天)
Hi everyone!
So I'm trying to plot a graph of temperature with depth at 4 stations with varied depths. The data that i have is in 4 different files and I'm trying to combine them all into 1 graph with temperature on the x axis and depth on the y axis but i need the y axis to start from the top and the x axis to be on the top as well.
I'v tried multiple times to do this but cant seem to work it out
Thanks in advance!!

采纳的回答

KSSV
KSSV 2016-11-8
[num,txt,raw] = xlsread('Temperature set.csv');
% num = flipud(num) ;
depth = num(:,1) ;
s1 = num(:,2) ;
s2 = num(:,3) ;
s3 = num(:,4) ;
s4 = num(:,5) ;
% plot
hold on
plot(s1,depth,'r') ;
plot(s2,depth,'b') ;
plot(s3,depth,'m') ;
plot(s4,depth,'c') ;
set(gca,'xaxisLocation','top')
set(gca,'YDir','reverse');
legend([{'station 1'};{'station 2'}; {'station 3'};{'station 4'}] )

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Directed Graphs 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by