用RegionPlot画不等式区域,怎么在特定的边界添加虚线或实线
mathematica吧
全部回复
仅看楼主
level 1
ccycthh 楼主
想用RegionPlot画不等式区域,并在特定边界画虚线和实线,来区分小于号和等号,目标图为
,如果直接用BoundaryStyle会让我坐标取值截断的边界也会有虚线,并且没法画出实线,有没有大佬解答一下要怎么做?[泪]
2023年03月21日 07点03分 1
level 1
ccycthh 楼主
代码为
RegionPlot[{y < 0.5 x + 3, y >= x^2}, {x, -3, 3}, {y, -1, 5},
BoundaryStyle -> Dashed, Frame -> False, AxesOrigin -> True,
Axes -> True, AxesLabel -> Automatic]
2023年03月21日 07点03分 3
吧务
level 12
用ContourPlot画边界,再Show到一起就可以了
Show[
RegionPlot[{y < 0.5 x + 3, y >= x^2}, {x, -3, 3}, {y, -1, 5},
BoundaryStyle -> None, Frame -> False, AxesOrigin -> True,
Axes -> True, AxesLabel -> Automatic],
ContourPlot[{y == 0.5 x + 3, y == x^2}, {x, -3, 3}, {y, -1, 5},
ContourStyle -> {Dashed, Automatic}]
]
2023年03月25日 08点03分 4
1