Temperature with depth graph

1 回表示 (過去 30 日間)
Jack Lakeman
Jack Lakeman 2016 年 11 月 7 日
回答済み: KSSV 2016 年 11 月 8 日
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 Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by