How can I plot 3 defined variables on a loglog scale with 2 x-axis with same y-axis.
1 view (last 30 days)
Show older comments
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 Comment
dpb
on 22 Nov 2018
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.
Answers (0)
See Also
Categories
Find more on Log Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!