多语言展示
当前在线:1651今日阅读:84今日分享:32

Mathematica基础——RegionPlot的用法(1)

这一次,我们一起学习一下RegionPlot在Mathematica里的基本用法。
工具/原料
1

电脑

2

Mathematica

方法/步骤
1

RegionPlot[不等式,{x,xmin,xmax},{y,ymin,ymax}——作出 “不等式”代表的区域.        举个例子,作出不等式x^2 + y^3 < 2&&-2

2

指定区域的颜色:RegionPlot[x^2 + y^3 < 2, {x, -2, 2}, {y, -2, 2},PlotStyle->Green]

3

改变区域边界的颜色:RegionPlot[x^2 + y^3 < 2, {x, -2, 2}, {y, -2, 2},BoundaryStyle ->Red,PlotStyle->Green]

5

画出不等式组代表的区域:RegionPlot[x^2 + y^3 < 2 && x + y < 1, {x, -2, 2}, {y, -2, 2}]RegionPlot[x^2 + y^3 < 2 && x + y > 1, {x, -2, 2}, {y, -2, 2}]

6

画出sinx*siny>0.2代表的区域:RegionPlot[Sin[x] Sin[y] >0.2, {x, -10, 10}, {y, -10, 10}, BoundaryStyle -> Dashed, PlotStyle -> Red]

7

给不同区域添加图例:RegionPlot[{x^6 < y^3 + 1, y^6 < x^3 + 1}, {x, -2, 5}, {y, -2, 5}, PlotLegends -> 'Expressions']

注意事项
1

这里,只介绍了RegionPlot的最基本用法,其它应用技巧,以后再做介绍!

2

如果本文对你有所帮助,请点个赞好吗?

推荐信息