|
SOLUTIONS
|
MATHEMATICA 内置符号
DensityPlot[f, {x, xmin, xmax}, {y, ymin, ymax}]
用来绘制关于 x 和 y 的函数 f 的密度图形.
更多信息更多信息
- DensityPlot 默认情况下生成着色灰度输出,其中大的数值用较大的高亮显示.
- 在 f 无法计算得到实数的位置,密度图的背景处留有以"洞"(hole)表示的记号.
- DensityPlot 用 Block 视 x 和 y 为本地数值.
- DensityPlot 的属性 HoldAll 决定仅在指定数值 x 和 y 后计算 f.
- 在某些情况下指定 x 和 y 之前用 Evaluate 计算 f 会更有效.
- f 计算得到 None 处的区域为空白.
- DensityPlot 有和 Graphics 相同的选项,并增加下列变化:
-
AspectRatio 1 长与宽的比例 BoundaryStyle None 如何绘制 RegionFunction 的边界 BoxRatios Automatic 3D 边框的长宽比例 ClippingStyle None 如何绘制 PlotRange 中的值 ColorFunction Automatic 如何对图着色 ColorFunctionScaling True 是否对 ColorFunction 的参数着色 EvaluationMonitor None 在每次函数计算时计算的表达式 Exclusions Automatic 不包含
的曲线ExclusionsStyle None 需要绘制的除曲线外的内容 Frame True 是否绘制边框 FrameTicks Automatic 边框刻度 LightingAngle None 模拟光源的角度 MaxRecursion Automatic 纯量场的递归最大次数 Mesh None 背景网格线的数量 MeshFunctions {#1&,#2&} 决定网格线的位置 MeshStyle Automatic 网格线的风格 Method Automatic 绘图使用的方法 PerformanceGoal $PerformanceGoal 最优化外观 PlotLegends None 颜色梯度的图例 PlotPoints Automatic 函数在不同方向上样本点的初始值 PlotRange {Full,Full,Automatic} f 或其它值的范围 PlotRangeClipping True 是否锁定绘制范围 PlotRangePadding Automatic 垫衬多少值的范围 RegionFunction (True&) 决定是否包含一个点的方法 WorkingPrecision MachinePrecision 内部计算的精度 - PlotLegends 的可能设置包括:
-
None 不使用图例 Automatic 自动从 ColorFunction 确定图例 Placed[lspec,...] 指定图例位置 - DensityPlot 在由 PlotPoints 指定的等距离样本点组成的网格处对 f 进行初始计算. 之后使用一个自适应算法来进行至多 MaxRecursion 次细分,以生成平滑等高线.
- 由于 DensityPlot 仅使用有限的样本点,所以可能会丢失函数的特征. 可以尝试增加 PlotPoints 和 MaxRecursion 的设置来检验结果.
- 设置为 Mesh->All,DensityPlot 绘制网格线以显示所用的所有细分.
- 缺省设置 MeshFunctions->{#1&, #2&} 绘制 x、y 网格.
- 提供给函数 MeshFunctions 和 RegionFunction 的参数为 x、y、f.
- ColorFunction 可以只有一个缺省来自 f 的参数.
- 默认设置 Exclusions->Automatic 和 ExclusionsStyle->None 下,DensityPlot 在密度图找到的不连续曲线处打破连续性.
- DensityPlot 返回 Graphics[GraphicsComplex[data]].
版本 1 的新功能 | 版本 9 修改功能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »





