hey there
I would like to plot one figure with two x-axes and one y-axes, at which from a
point in the figure, I can determine two parameters from the two x-axes, here is
the program:
%data1 = [ones(1,size(data2,2));data2];
%data8 = [ones(1,size(data3,2));data3];
%data9 = [ones(1,size(data4,2));data4];
%data10 = [ones(1,size(data5,2));data5];
%data11 = [ones(1,size(data6,2));data6];
%data12 = [ones(1,size(data7,2));data7];
%kratio7 = [ones(1,size(kratio1,2));kratio1];
%kratio8 = [ones(1,size(kratio2,2));kratio2];
%kratio9 = [ones(1,size(kratio3,2));kratio3];
%kratio10 = [ones(1,size(kratio4,2));kratio4];
%kratio11 = [ones(1,size(kratio5,2));kratio5];
%kratio12 = [ones(1,size(kratio6,2));kratio6];
x0 = [1.0 0.577000000 0.316200000 0.182560000 0.100000000 0.057735000
0.031622700 0.018257420 0.010000000 0.005773503];
% x1 = [1.0 1.28593712025 1.42858337425 1.47541359455 1.49253731343
1.49750416206 1.49925037844 1.49975004162 1.49992500375 1.49997500041];
% x2 = [1.0 1.20014557766 1.29032988974 1.31868357047 1.32890365449
1.33185349749 1.33288903914 1.33318520162 1.33328889037 1.33331851868];
% x3 = [1.0 1.28593712025 1.42858337425 1.47541359455 1.49253731343
1.49750416206 1.49925037844 1.49975004162 1.49992500375 1.49997500041];
% x4 = [1.0 1.20014557766 1.29032988974 1.31868357047 1.32890365449
1.33185349749 1.33288903914 1.33318520162 1.33328889037 1.33331851868];
% x5 = [1.0 1.50045501298 1.81821084344 1.93549357291 1.98019801980
1.99335548790 1.99800200767 1.99933355538 1.99980002000 1.99993333555];
% x6 = [1.0 1.28593712025 1.42858337425 1.47541359455 1.49253731343
% 1.49750416206 1.49925037844 1.49975004162 1.49992500375 1.49997500041];
x = [0.0:.05:1.0];
xi = [1.0:0.05:2.0];
color = 'm'; marker = 'p';
color1 = 'g'; marker1 = '+';
color2 = 'b'; marker2 = 'h';
color3 = 'k'; marker3 = 'o';
color4 = 'c'; marker4 = '*';
color5 = 'r'; marker5 = 'x';
for j = 1:size(data140,2)
pp=spline(x0,data140(:,j));
hl1 = plot(x,ppval(pp,x),[marker(j) color(j) '-']);
hold on
end
for j2 = 1:size(data141,2)
pp1=spline(x0,data141(:,j2));
hl2 = plot(x,ppval(pp1,x),[marker1(j2) color1(j2) '-']);
hold on
end
for j3 = 1:size(data142,2)
pp2=spline(x0,data142(:,j3));
hl3 = plot(x,ppval(pp2,x),[marker2(j3) color2(j3) '-']);
hold on
end
for j4 = 1:size(data143,2)
pp3=spline(x0,data143(:,j4));
hl4 = plot(x,ppval(pp3,x),[marker3(j4) color3(j4) '-']);
hold on
end
%for j5 = 1:size(data11,2)
% pp4=spline(x0,data11(:,j5));
% hl5 = plot(x,ppval(pp4,x),[marker4(j5) color4(j5) '-']);
% hold on
%end
%for j6 = 1:size(data12,2)
% pp5=spline(x0,data12(:,j6));
% hl6 = plot(x,ppval(pp5,x),[marker5(j6) color5(j6) '-']);
% hold on
%end
%legend
('1:400','1:266.67','1:200','1:133.33','1:100','1:50','Location','Best')
grid
xlabel ('Kmatrix'); ylabel ('Increased Flux');
legend
('1:400[inner]-1:200[outer]','1:200[inner]-1:100[outer]','1:100[inner]-1:50[oute
r]','1:50[inner]-1:25[outer]','Location','NorthEast')
hold on
ax1 = gca;
set(ax1,'XColor','k','YColor','k')
%XLim([1.0 2.0])
ax2 = axes
('Position',get(ax1,'Position'),'XAxisLocation','top','YAxisLocation','left','Co
lor','none','XColor','k','YColor','k');
hold on
for j7 = 1:size(data140,2)
pp6=spline(kratio140,data140(:,j7));
hl7 = plot(xi,ppval(pp6,xi),[marker(j7) color(j7) ':'],'Parent',ax2);
% h1 = plot(x,ppval(pp6,x),[marker(j7) color(j7) ':']);
%plotyy ('plot')
hold on
end
hold on
for j8 = 1:size(data141,2)
pp7=spline(kratio140,data141(:,j8));
hl8 = plot(xi,ppval(pp7,xi),[marker1(j8) color1(j8) ':'],'Parent',ax2);
%plotyy ('plot')
hold on
end
hold on
for j9 = 1:size(data142,2)
pp8=spline(kratio140,data142(:,j9));
hl9 = plot(xi,ppval(pp8,xi),[marker2(j9) color2(j9) ':'],'Parent',ax2);
%plotyy ('plot')
hold on
end
hold on
for j10 = 1:size(data143,2)
pp9=spline(kratio140,data143(:,j10));
hl10 = plot(xi,ppval(pp9,xi),[marker3(j10) color3(j10) ':'],'Parent',ax2);
%plotyy ('plot')
hold on
end
hold on
%for j11 = 1:size(kratio11,2)
% pp10=spline(x0,kratio11(:,j11));
% hl11 = plot(x,ppval(pp10,x),[marker4(j11) color4(j11) ':'],'Parent',ax2);
%plotyy ('plot')
% hold on
%end
%hold on
%for j12 = 1:size(kratio12,2)
% pp11=spline(x0,kratio12(:,j12));
% hl12 = plot(x,ppval(pp11,x),[marker5(j12) color5(j12) ':'],'Parent',ax2);
%plotyy ('plot')
% hold on
%end
hold on
legend
('1:400[inner]-1:200[outer]','1:200[inner]-1:100[outer]','1:100[inner]-1:50[oute
r]','1:50[inner]-1:25[outer]','Location','North')
%grid
xlabel ('Kratio'); ylabel ('');
title ({'Eliptic Fracture in Porous Medium';'Variation in Width of Inner & Outer
Fracture';'[Klow = Kmatrix;Khigh = 1/Kmatrix]'})
%XLim([1.0 2.0])
xlimits = get(ax1,'XLim');
ylimits = get(ax1,'YLim');
xinc = (xlimits(2)-xlimits(1))/5;
yinc = (ylimits(2)-ylimits(1))/5;
ax2('position',[1 1.1 1.2 1.3 1.4])
set(ax1,'XTick',[xlimits(1):xinc:xlimits(2)],'YTick',[ylimits(1):yinc:ylimits(2)
])
My question is how to make the 2nd set of data (with its own x-axes and y-axes)
to be omitted and that the x-values of this 2nd set of data are then determined
from the 1st set of data (x-values)?
Kindly advise and thanks in advance.
regards
V
--
<http://forum.pspad.com/read.php?2,54405,54405>
PSPad freeware editor http://www.pspad.com