Wolfram mathematica 在Mathematica中,如何叠加两个ListLinePlot?

Wolfram mathematica 在Mathematica中,如何叠加两个ListLinePlot?,wolfram-mathematica,interpolation,Wolfram Mathematica,Interpolation,我用ListPlot在一些数据点上画了两条平滑的线。但是我想叠加这个图,我了解到ListPlot用于插值的方法是将每个坐标作为列表索引的函数进行插值。所以我不能简单地加两个 我的两点的插值 谢谢 jzm 以下是一些用于复制/粘贴的文本: myPoints1 = {{1.4620657889458748`, 335.2985577878116`}, {1.4620965802217518`, 103.38351787529564`}, {1.4621942025270345`, 62.555

我用ListPlot在一些数据点上画了两条平滑的线。但是我想叠加这个图,我了解到ListPlot用于插值的方法是将每个坐标作为列表索引的函数进行插值。所以我不能简单地加两个 我的两点的插值

谢谢

jzm

以下是一些用于复制/粘贴的文本:

myPoints1 = {{1.4620657889458748`, 
335.2985577878116`}, {1.4620965802217518`, 
103.38351787529564`}, {1.4621942025270345`, 
62.5559208248015`}, {1.462354896492246`, 
45.566589506360216`}, {1.4625751467402768`, 
36.264281440327565`}, {1.4628516301983985`, 
30.399003865053114`}, {1.4631812807492346`, 
26.367460111951058`}, {1.4635611902991474`, 
23.429554855802188`}, {1.4639886111585874`, 
21.195443300677702`}, {1.464460983399038`, 
19.440829611123966`}, {1.4649759015994719`, 
18.02777886500251`}, {1.4655311109490736`, 
16.86675689819105`}, {1.466124470097565`, 
15.896899417397284`}, {1.4667539758770534`, 
15.075547889029616`}, {1.467417728656181`, 
14.37183869811537`}, {1.468113935160521`, 
13.76291072113658`}, {1.4688409098827062`, 
13.231534377122449`}, {1.4695970390339186`, 
12.764290193109172`}, {1.4703808152150737`, 
12.350655500316538`}, {1.47119080820051`, 
11.982259112096562`}, {1.4720256766729714`, 
11.652466731657922`}, {1.4728841551349938`, 
11.35608813384227`}, {1.4737650210799367`, 
11.088805023428025`}, {1.4746670942175184`, 
10.846730689594123`}, {1.4755892711659102`, 
10.626599181057326`}, {1.4765305432312286`, 
10.425844517518913`}, {1.4774899140433866`, 
10.242189544437958`}, {1.4784664768294848`, 
10.07388845283117`}, {1.4794593535682306`, 
9.91948469998374`}, {1.480467656424019`, 
9.777491405153027`}, {1.4814906043125302`, 
9.646805534544441`}, {1.4825273964568986`, 
9.526291139015447`}, {1.4835772786981303`, 
9.414764726544572`}, {1.4846395968104766`, 
9.311395888282872`}, {1.4857136927436698`, 
9.215545785306015`}, {1.4867989654798728`, 
9.12678547130485`}, {1.487894785812934`, 
9.0445918653539`}, {1.489000547636927`, 
8.968341543739935`}, {1.49011571024499`, 
7.71616343700933`}, {1.4912397307928495`, 
4.4771368717931965`}, {1.4930948425223702`, 
2.7599903709003706`}, {1.4972705714803425`, 2.137733395169292`}};
myPoints2={{1.9550995254889463, 0.7164793699550908}, {1.9391287471262355, 0.41710931241140287}, {1.9139528821159193, 0.3490726623599497}, {1.884617534719042, 0.3308820126668058}, {1.8540123750258504, 0.33265450551933234}, {1.8237456098779754, 0.3452794413751484}, {1.7946805323610866, 0.36513934480358856}, {1.7672498634600862, 0.3905924543768967}, {1.7416378319498413, 0.42085584504202456}, {1.717886011205134, 0.45557423825820337}, {1.6959554065943552, 0.49463019895914645}, {1.675763216373194, 0.5380524422510392}, {1.6572047192352064, 0.5859687470445493}, {1.6401662975943239, 0.6385812315738714}, {1.6245331447101943, 0.6961532977719818}, {1.6101937002933333, 0.7590036122922289}, {1.5970420916568349, 0.8275045669571167}, {1.5849793700525658, 0.9020832266507519}, {1.5739139593253322, 0.9832255360102758}, {1.5637616875683809, 1.071482155332956}, {1.5544455489784297, 1.1674755467368436}, {1.5458952859916812, 1.2719109855898907}, {1.538046945587126, 1.3855881585132812}, {1.5308423787211705, 1.5094157124835617}, {1.5242287288899015, 1.6444321762294256}, {1.5181579889629853, 1.7918272163885938}, {1.512586535548833, 1.952969437543702}, {1.5074747129386745, 2.1294427702228105}, {1.5027864632086367, 2.3230885849762424}, {1.4984889655043911, 2.536061738604728}, {1.4945523307439923, 2.7708992557015053}, {1.4909493139037207, 3.0306073328297867}, {1.4876550515968234, 3.3187795649748657}, {1.4846468371914137, 3.6397480437107252}, {1.481903916697491, 3.9987774524193394}, {1.4794072959177726, 4.4023273698572325}, {1.4771395719585305, 4.858408392792459}, {1.4750847772800355, 5.37708563628973}, {1.4732282431253443, 5.971204815109932}, {1.4715564902918326, 6.657415608955233}, {1.4700571242943155, 7.457674059555506}, {1.4687187279247118, 8.40154880208839}, {1.4675307832019475, 9.529729255387132}, {1.4664835796976867, 10.899794007715421}, {1.46556811155878, 12.596323274840168}, {1.4647760611386595, 14.748618559900901}, {1.4640997339059703, 17.564564972128032}, {1.463531979901696, 21.401490423013954}, {1.4630661880201312, 26.92897502098747}, {1.462696204020183, 35.566591773864054}, {1.4624163023794263, 50.94289950596402}, {1.462221186527755, 85.91265697099175}, {1.4621058905589708, 243.1565306412274}, {1.4620657889458748, 335.2985577878116}};

我想要的不是

Show[ListPlot[myPoints1, Joined -> True, Mesh -> Full], 
     ListPlot[myPoints2, Joined -> True, Mesh -> Full]]
不知道如何得到两个图的值的叠加图。请帮助!:
叠加的意思是在每个x轴上得到两条曲线值的加号

听起来你想要这样的东西来增加你的台词

it1 = Interpolation[myPoints1];
it2 = Interpolation[myPoints2];
t1 = Table[it1[i], {i, 1.467, 1.497, 0.001}];
t2 = Table[it2[i], {i, 1.467, 1.497, 0.001}];
t3 = Transpose[{Range[1.467, 1.497, 0.001], t1 + t2}];
ListPlot[{myPoints1, myPoints2, t3}, Joined -> True,
 PlotRange -> {{1.467, 1.497}, {0, 30}}, PlotMarkers -> Automatic]

试着更好地解释你期望的结果,这个问题一点也不清楚。对不起,我没有清楚地解释我的问题。我希望得到每个x轴上两条曲线值的加号。我不知道这次我是否能更清楚地表达这个问题。非常感谢!对不起,我的问题没有解释清楚。有时i的范围并不总是相同的。例如,Min[myPoint1]可能是1,Min[myPoint2]可能是1.467。我必须把数据域分成几个部分吗?你只需要求和的一个公共范围,t1+t2我尝试了以下代码:it1=插值[myPoints1];it2=插值[myPoints2];t1=表[it1[i],{i,1.467,1.497,0.001}];t2=表[it2[i],{i,1.467,1.497,0.001}];t22=表[it2[i],{i,1.497,1.9,0.001}];t222=转座[{Range[1.497,1.9,0.001],t22}];t3=转座[{Range[1.467,1.497,0.001],t1+t2}];ListPlot[t3]ListPlot[t222]ListLinePlot[Union[t3,t222],PlotRange->All]我不知道这个方法是否足够好,可以得到我点的整个图?看起来不错,除了Union[t3,t222]在x=1.497处有两个点。可以执行ListLinePlot[Join[t3,Rest@t222],绘图范围->全部]