How to overlap time vectors and plot in multiple axis ?

13 ビュー (過去 30 日間)
Jeevan Kumar Bodaballa
Jeevan Kumar Bodaballa 2019 年 11 月 21 日
回答済み: dpb 2019 年 11 月 22 日
Here are my questions !
How can I add third Y-axis in same plot
Here in data 6 variables(dt,temptime,Tout,RHout,Sat,mix) are present and I would like have
dt & temptime variables in x-axis
Sat & RHout in yyleft axis
Tout in yyright axis
mix in yyright as third axis
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 11 月 22 日
Jeevan Kumar Bodaballa if you consider your question to be unclear, then as you are the person who asked the question, you should clarify the question.

サインインしてコメントする。

採用された回答

Ridwan Alam
Ridwan Alam 2019 年 11 月 21 日
編集済み: Ridwan Alam 2019 年 11 月 21 日
Hope this helps:
fig=figure(1);
yyaxis left
plot(dt,Sat,'b--','Linewidth',2);
% hold on;
% plot(temptime(3470:3578),RHout(3470:3578),'b.','Linewidth',2);
ylabel('Saturation and RH');
hold on;
yyaxis right
plot(dt,mix,'r-','LineWidth',2);
hold on;
plot(temptime(3470:3578),Tout(3470:3578),'r.','LineWidth',2)
xlabel('Time (h)'); %
ylabel('Mixing ratio [Kg/Kg]');
set(gca, 'YScale', 'log');
grid on
untitled.jpg
  2 件のコメント
dpb
dpb 2019 年 11 月 22 日
There's not a function supplied with Matlab to have more than the left/right axis.
You either have to "roll your own" by shrinking the existing axis in the x direction enough and creating a new one or use one of the FEX submittals. I know there are some over there but I've not used any so can't recommend any particular one as the gold standard.

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by