为什么ListDensityPlot什么都不做?

时间:2017-01-01 08:33:34

标签: list plot wolfram-mathematica density-plot

我有很多从数值模拟中提取的数据。数据的排列方式使得每组数据代表与某个x位置相关的数据,例如:

    Data1 = {{0.005, 0, 0.}, {0.005, 7/400, 0.}, {0.005, 7/200, 0.}, {0.005, 21/
  400, 0.}, {0.005, 7/100, 0.}, {0.005, 7/80, 0.}, {0.005, 21/200, 
  0.}, {0.005, 49/400, 0.}, {0.005, 7/50, 0.}, {0.005, 63/400, 
  0.}, {0.005, 7/40, 0.}, {0.005, 77/400, 0.}, {0.005, 21/100, 
  0.}, {0.005, 91/400, 0.}, {0.005, 49/200, 0.}, {0.005, 21/80, 
  0.}, {0.005, 7/25, 0.}, {0.005, 119/400, 0.}, {0.005, 63/200, 
  0.}, {0.005, 133/400, 0.}, {0.005, 7/20, 0.}, {0.005, 147/400, 
  0.}, {0.005, 77/200, 0.}, {0.005, 161/400, 0.}, {0.005, 21/50, 
  0.}, {0.005, 7/16, 0.}, {0.005, 91/200, 0.}, {0.005, 189/400, 
  0.}, {0.005, 49/100, 0.}, {0.005, 203/400, 0.}, {0.005, 21/40, 
  0.}, {0.005, 217/400, 0.}, {0.005, 14/25, 0.}, {0.005, 231/400, 
  0.}, {0.005, 119/200, 0.}, {0.005, 49/80, 0.}, {0.005, 63/100, 
  0.}, {0.005, 259/400, 0.}, {0.005, 133/200, 0.}, {0.005, 273/400, 
  0.}, {0.005, 7/10, 0.}, {0.005, 287/400, 0.}, {0.005, 147/200, 
  0.}, {0.005, 301/400, 0.}, {0.005, 77/100, 0.}, {0.005, 63/80, 
  0.}, {0.005, 161/200, 0.}, {0.005, 329/400, 0.}, {0.005, 21/25, 
  0.}, {0.005, 343/400, 0.}};


        Data2 = {{0.00725, 0, 1.}, {0.00725, 7/400, 1.}, {0.00725, 7/200, 
  1.}, {0.00725, 21/400, 0.999999}, {0.00725, 7/100, 
  0.999999}, {0.00725, 7/80, 0.999997}, {0.00725, 21/200, 
  0.999995}, {0.00725, 49/400, 0.999981}, {0.00725, 7/50, 
  0.999968}, {0.00725, 63/400, 0.999891}, {0.00725, 7/40, 
  0.999814}, {0.00725, 77/400, 0.999365}, {0.00725, 21/100, 
  0.998917}, {0.00725, 91/400, 0.996302}, {0.00725, 49/200, 
  0.993687}, {0.00725, 21/80, 0.978445}, {0.00725, 7/25, 
  0.963204}, {0.00725, 119/400, 0.899477}, {0.00725, 63/200, 
  0.835751}, {0.00725, 133/400, 0.736993}, {0.00725, 7/20, 
  0.638234}, {0.00725, 147/400, 0.525265}, {0.00725, 77/200, 
  0.412296}, {0.00725, 161/400, 0.308919}, {0.00725, 21/50, 
  0.205542}, {0.00725, 7/16, 0.133532}, {0.00725, 91/200, 
  0.0615207}, {0.00725, 189/400, 0.0360389}, {0.00725, 49/100, 
  0.0105571}, {0.00725, 203/400, 0.00618536}, {0.00725, 21/40, 
  0.00181365}, {0.00725, 217/400, 0.00106379}, {0.00725, 14/25, 
  0.000313931}, {0.00725, 231/400, 0.000185401}, {0.00725, 119/200, 
  0.0000568705}, {0.00725, 49/80, 0.0000348786}, {0.00725, 63/100, 
  0.0000128867}, {0.00725, 259/400, 9.12786*10^-6}, {0.00725, 133/200,
   5.36902*10^-6}, {0.00725, 273/400, 4.71136*10^-6}, {0.00725, 7/10, 
  4.0537*10^-6}, {0.00725, 287/400, 3.91609*10^-6}, {0.00725, 147/200,
   3.77848*10^-6}, {0.00725, 301/400, 3.72831*10^-6}, {0.00725, 77/
  100, 3.67815*10^-6}, {0.00725, 63/80, 3.64697*10^-6}, {0.00725, 161/
  200, 3.61579*10^-6}, {0.00725, 329/400, 3.59416*10^-6}, {0.00725, 
  21/25, 3.57253*10^-6}, {0.00725, 343/400, 3.55889*10^-6}};



        Data3 = {{0.0095, 0, 1.}, {0.0095, 7/400, 1.}, {0.0095, 7/200, 1.}, {0.0095, 
  21/400, 1.}, {0.0095, 7/100, 1.}, {0.0095, 7/80, 1.}, {0.0095, 21/
  200, 1.}, {0.0095, 49/400, 1.}, {0.0095, 7/50, 1.}, {0.0095, 63/400,
   1.}, {0.0095, 7/40, 1.}, {0.0095, 77/400, 1.}, {0.0095, 21/100, 
  1.}, {0.0095, 91/400, 1.}, {0.0095, 49/200, 1.}, {0.0095, 21/80, 
  1.}, {0.0095, 7/25, 1.}, {0.0095, 119/400, 1.}, {0.0095, 63/200, 
  1.}, {0.0095, 133/400, 1.}, {0.0095, 7/20, 1.}, {0.0095, 147/400, 
  1.}, {0.0095, 77/200, 1.}, {0.0095, 161/400, 1.}, {0.0095, 21/50, 
  1.}, {0.0095, 7/16, 1.}, {0.0095, 91/200, 0.999999}, {0.0095, 189/
  400, 0.999998}, {0.0095, 49/100, 0.999997}, {0.0095, 203/400, 
  0.999989}, {0.0095, 21/40, 0.999981}, {0.0095, 217/400, 
  0.999935}, {0.0095, 14/25, 0.999889}, {0.0095, 231/400, 
  0.99962}, {0.0095, 119/200, 0.999351}, {0.0095, 49/80, 
  0.997785}, {0.0095, 63/100, 0.99622}, {0.0095, 259/400, 
  0.987093}, {0.0095, 133/200, 0.977966}, {0.0095, 273/400, 
  0.924772}, {0.0095, 7/10, 0.871577}, {0.0095, 287/400, 
  0.779607}, {0.0095, 147/200, 0.687637}, {0.0095, 301/400, 
  0.576285}, {0.0095, 77/100, 0.464932}, {0.0095, 63/80, 
  0.357661}, {0.0095, 161/200, 0.250389}, {0.0095, 329/400, 
  0.169795}, {0.0095, 21/25, 0.0892001}, {0.0095, 343/400, 0.0522537}};

Data4 = {{0.01175, 0, 1.}, {0.01175, 7/400, 1.}, {0.01175, 7/200, 
  1.}, {0.01175, 21/400, 1.}, {0.01175, 7/100, 1.}, {0.01175, 7/80, 
  1.}, {0.01175, 21/200, 1.}, {0.01175, 49/400, 1.}, {0.01175, 7/50, 
  1.}, {0.01175, 63/400, 1.}, {0.01175, 7/40, 1.}, {0.01175, 77/400, 
  1.}, {0.01175, 21/100, 1.}, {0.01175, 91/400, 1.}, {0.01175, 49/200,
   1.}, {0.01175, 21/80, 1.}, {0.01175, 7/25, 1.}, {0.01175, 119/400, 
  1.}, {0.01175, 63/200, 1.}, {0.01175, 133/400, 1.}, {0.01175, 7/20, 
  1.}, {0.01175, 147/400, 1.}, {0.01175, 77/200, 1.}, {0.01175, 161/
  400, 1.}, {0.01175, 21/50, 1.}, {0.01175, 7/16, 1.}, {0.01175, 91/
  200, 1.}, {0.01175, 189/400, 1.}, {0.01175, 49/100, 1.}, {0.01175, 
  203/400, 1.}, {0.01175, 21/40, 1.}, {0.01175, 217/400, 
  1.}, {0.01175, 14/25, 1.}, {0.01175, 231/400, 1.}, {0.01175, 119/
  200, 1.}, {0.01175, 49/80, 1.}, {0.01175, 63/100, 1.}, {0.01175, 
  259/400, 1.}, {0.01175, 133/200, 1.}, {0.01175, 273/400, 
  1.}, {0.01175, 7/10, 1.}, {0.01175, 287/400, 1.}, {0.01175, 147/200,
   1.}, {0.01175, 301/400, 1.}, {0.01175, 77/100, 1.}, {0.01175, 63/
  80, 1.}, {0.01175, 161/200, 1.}, {0.01175, 329/400, 1.}, {0.01175, 
  21/25, 1.}, {0.01175, 343/400, 0.999999}};

在每个数据集中,每行包含3个值,分别代表x位置,y位置和温度。如您所见,每个数据集代表特定x位置的温度值和y位置的不同值。 我想要做的是将所有数据集放在一个列表中,然后密集绘制它们。但是,当我执行ListDensityPlot时,它不会执行任何操作,只显示绘图的框架。

1 个答案:

答案 0 :(得分:1)

您可以使用union命令。

DataAll = Union[Data1, Data2, Data3, Data4];
ListDensityPlot[DataAll, Mesh -> All]

density.png

或者join也正常工作:

DataAll = Join[Data1, Data2, Data3, Data4];

catenate

DataAll = Catenate[{Data1, Data2, Data3, Data4}];

flatten

DataAll = Flatten[{Data1, Data2, Data3, Data4}, 1];