【问题标题】:Smooth out Density Plot Mathematica平滑密度图 Mathematica
【发布时间】:2013-08-25 12:20:48
【问题描述】:

我正在将一个三列表导入 Mathematica 并使用它来制作密度图。但是,除非您以小增量拥有大量数据,否则密度图看起来是不连贯的,并且显然不连续。

有没有办法或函数来平滑我的情节?

谢谢, 本

【问题讨论】:

    标签: plot wolfram-mathematica density-plot


    【解决方案1】:

    使用InterpolationOrder:

    data = Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}];
    GraphicsRow@{ListDensityPlot[data, Mesh -> None, InterpolationOrder -> 3], 
                 ListDensityPlot[data, Mesh -> None]}
    

    【讨论】:

      【解决方案2】:

      我猜你正在寻找的是InterpolationOrder 选项。下面是文档中的示例,它显示了即使对于 6x6 数据网格也是如何工作的

      data = Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}];
      Table[ListDensityPlot[data, Mesh -> None, InterpolationOrder -> o, 
        ColorFunction -> "SouthwestColors"], {o, {0, 1, 2, 3}}]
      

      【讨论】:

      • 比你快 5 秒 :)
      • @belisarius 什么鬼.. 等等,让我否决您对第一个版本中不存在的代码格式的回答;-)
      猜你喜欢
      • 2020-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-21
      • 1970-01-01
      • 1970-01-01
      • 2020-08-25
      • 2015-02-23
      相关资源
      最近更新 更多