Mathematica基础——ContourPlot的选项

 时间:2024-10-12 23:29:16

1、AspectRatio指定图形的高度跤耧锿葡与宽度的比值。ContourPlot[Cos[x] + Cos[y] == 0, {x, 0, 4 Pi}, {y, 0, 4 Pi},AspectRatio -> 2]上面代码表示高宽比值为2:1.我们一般情况下,要获得实际比例的高宽比值,可以用AspectRatio -> Automatic来指定:Table[ContourPlot[Cos[x] + Cos[y] == 0, {x, 0, 4 Pi}, {y, 0, 4 Pi}, AspectRatio -> u], {u, {2, 1, 1/2, Automatic}}]

Mathematica基础——ContourPlot的选项

2、用BoundaryStyle来界定整个图形的边界的样式:ContourPlot[Cos[x^2] + Cos[y^2], {x, 0, 2 Pi}, {y, 0, 2 Pi},BoundaryStyle -> {Green, Thickness[0.01]}]边界是绿色的线,粗细程度是0.01.

Mathematica基础——ContourPlot的选项

3、用Axes指定是否显示坐标轴!但是,在有边框(Frame->True)和无边框(Frame->False)的时候,有一点小区别,大家仔细看:ContourPlot[Cos[x^2] + Cos[y^2], {x, -Pi, 2 Pi}, {y, -Pi, 2 Pi},Axes -> True, Frame -> False]

Mathematica基础——ContourPlot的选项Mathematica基础——ContourPlot的选项

4、用ContourLabels -> True来为所绘制的等高线加上标签!而这些标签,就是等高线的数值。ContourPlot[Sin[x/3] Sin[y^2/2], {x, -3, 6}, {y, -5, 3},ContourLabels -> True, AspectRatio -> Automatic]

Mathematica基础——ContourPlot的选项

5、用Contours -> u来指定等高线的密度,这里,u的值分别是5、10、20、30,u越大,殪讧唁跬等高线越密集!Table[ContourPlot[Sin[x/3] Sin[y^2/2], {x, -3, 6}, {y, -5, 3}, Contours -> u, ContourLabels -> True, AspectRatio -> Automatic], {u, {5, 10, 20, 30}}]

Mathematica基础——ContourPlot的选项
  • Mathematica笔记本的交互式用法
  • 如何使用mathematica求解矩阵的特征值?
  • mathematica 如何画图
  • Mathematica 特殊字符输入(希腊字母/运算符)
  • Mathematica基础——循环和迭代
  • 热门搜索
    京ag6代表什么 病娇是什么意思 什么东西能加不能减 假惺惺的意思 庄严的意思 什么是小高层 拜金女是什么意思 华诞是什么意思 登山鞋什么牌子好 青蛙靠什么呼吸