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 个评论

Does yyaxis help? Here is the documentation.
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 的更多信息

评论:

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