 
 
 
 
 
 
two figures on same axes with different scales
- To: mathgroup at smc.vnet.net
- Subject: [mg117028] two figures on same axes with different scales
- From: "Hagwood, Charles R." <charles.hagwood at nist.gov>
- Date: Tue, 8 Mar 2011 05:34:23 -0500 (EST)
If I plot the following ellipses on the same axes , then the left ellipse is much too small.  Is there a way to redo the plot with the right ellipse looking larger?
  dat1 = dat1={{0.4337088920,.217018691}, {0.406673987,0.21247881},{0.429538614,0.219284756},{0.435436816,0.219360297},{0.433708892,0.219415037},{0.434859313,0.220394942}};
dat2={{2.057100439,0.837794005},{2.148339169,0.868515281},{2.143940655,0.864046805},
{2.148432958,0.874271059},{2.183485822,0.880743617},{2.19696413,0.892192841}};
p1=ListPlot[{dat1,dat2}, Frame->True,Axes->False];
mx1=Mean[dat1[[All,1]]];
my1=Mean[dat1[[All,2]]];
c1={mx1,my1}
mx2=Mean[dat2[[All,1]]];
my2=Mean[dat2[[All,2]]];
c2={mx2,my2}
cov1=Covariance[dat1];
cov2=Covariance[dat2];
n=Length[dat1];
falpha=Quantile[FRatioDistribution[2,n-2], Sqrt[.975]];
r1=2*((n-1)/(n-2))*falpha/n;
r2=2*((n-1)/(n-2))*falpha/n;
f1[x_,y_]:={x-mx1,y-my1}.Inverse[cov1].{x-mx1,y-my1}
f2[x_,y_]:={x-mx2,y-my2}.Inverse[cov2].{x-mx2,y-my2}
p3=ContourPlot[f1[x,y]==r1,{x,.4,.6},{y,.2,.3},Frame->None,PlotRangePadding->{Scaled[3],Scaled[2]}];
p4=ContourPlot[f2[x,y]==r2,{x,2,2.4},{y,.8,.95},Frame->None];
data=Join[dat1,dat2]
model=LinearModelFit[data,x,x]
p2=Plot[model["BestFit"],{x,0,2.6}];
Show[{p1,p2,p3,p4}]

