2 different y axis plot using timeseries ?

I have a two different data of matrix 1014x1 and time vector 1x1014. The two different data must be plotted using two different y axes with X axis holding the time series from *11:51:20 to 12:08:11 *.
I tried using time series object. But I'm not getting 2 different Y axis. Instead y axis datas are getting plotted in same y axis.
Its is similar to plotyy function but I need x axis indicating from 11:51:20 to 12:08:11.
In other word i need to plot using plotyy function using time series.

답변 (1개)

Anand
Anand 2013년 3월 30일

0 개 추천

If you're working with timeseries objects, this should be quite easy.
Suppose you're timeseries objects are tsData1 and tsData2, you can use the following:
figure;
plotyy(tsData1.Time,tsData1.Data,tsData2.Time,tsData2.Data);

댓글 수: 4

karthik
karthik 2013년 3월 30일
I tried doing that also. but no use. . it will not show time in x axis rather it will simply show numbers from 0 to 1014.
Add the following line of code after the call to plotyy:
datetick;
karthik
karthik 2013년 4월 3일
no use ... junk values are coming in 'x' axis.
Hi
I am trying to plot with two y-axis using time series.Can anyone help me with this?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Two y-axis에 대해 자세히 알아보기

질문:

2013년 3월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by