How can I draw double Y-axis on a time series plot

조회 수: 1 (최근 30일)
H
H 2012년 11월 27일
I would like to draw these two graphs on a single panel with two y-axes. Does anyone know how?
fcha = timeseries(fch4,time,'Name','CH4');
fchb = timeseries(fco2,time,'Name','CO2');
tsc = tscollection({fcha fchb});
plot(tsc.CH4,'r-')
figure
plot(tsc.CO2,'b-')
Hiroki

답변 (2개)

Muruganandham Subramanian
Muruganandham Subramanian 2012년 11월 27일
You can do with 'subplot' command

Ilham Hardy
Ilham Hardy 2012년 11월 27일
x = time;
y = fch4;
y1 = fco2;
[ax,h1,h2] = plotyy(x,y,x,y1);
set(h1,'color','r');
set(h2,'color','b');

카테고리

Help CenterFile Exchange에서 Time Series Collections에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by