How can I plot 3 defined variables on a loglog scale with 2 x-axis with same y-axis.

1 次查看(过去 30 天)
load Cmp2.txt;
p= Cmp2(:,1);
u= Cmp2(:,2);
h=(p/(9.8*1000));
ii=(h/0.0011);
K=(u./ii);
Re=(1000*u*4e-4)/(0.001);
loglog(ii,K,'o') %This is the plot that I would like to add the third variable (Re).
title('K vs i'), xlabel('i (-)'), ylabel('K (m/s)')
axis([1e-5,10,0.15,0.5]);
%How Can alter the third x axis parameters/limits to fit the data better?
  1 个评论
dpb
dpb 2018-11-22
What do you want plotted, specifically? Need the data to be able to see what you've got.
Certainly it's possible to have two x-axes similar to two y-axes. TMW built yyaxis for the latter; hard to understand why they didn't go ahead with x as well, but there's example of what to do specifically and I suspect somebody else has been fed up enough to have posted a routine on the File Exchange.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Log Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by