Different y axis with same x axis

Hi,
I would like to create a graph with the operative temperatures of some specific rooms in order to see when we have overheating. Therefore, I'm trying to do a graph with Matlab using 2 different y axis. One axis should have the hours and the other one should have the operative temperature of the room. The X axe represents a time serie (per month). Please see below the graph I would like to create with Matlab.
This is the script I'm using right now, but can't have the graph I'd like to have:
"figure plot(operative_temperature) xlabel('Time [Months]') ylabel('Operative temperature [C]') title('Operative temperatures for XXX room') set(gca,'xtick',[1, 1*732,2*732,3*732,4*732,5*732,6*732,7*732,8*732,9*732,10*732,11*732]) set(gca,'xticklabel',['J';'F';'M';'A';'M';'J';'J';'A';'S';'O';'N';'D'])"
Do you know how can I make it?
Best regards,
Frank

댓글 수: 2

Swarooph
Swarooph 2017년 5월 17일
Does yyaxis help? Here is the documentation.
Rik
Rik 2017년 5월 18일
For future reference: have a read here, and when you write code in your question, use the {}Code button for better readability.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2017년 5월 17일

댓글:

Rik
2017년 5월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by