필터 지우기
필터 지우기

Temperature with depth graph

조회 수: 5 (최근 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 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