3
$\begingroup$

I want to keep the contour with the black point inside. How can I remove the contour situated on the right side without the black point inside without changing the x and y range?

ContourPlot[
 9359.40 + 4764.64 a^4 - 629.36 b + 478.27 b^2 - 11.27 b^3 + 
  3.62 b^4 + a^3 (-22894.13 + 134.51 b) + 
  a^2 (40827.53 - 675.68 b + 274.13 b^2) + 
  a (-32015.56 + 1087.07 b - 707.47 b^2 + 4.30 b^3), {a, 0.85, 
  1.6}, {b, -0.1, 2}, Contours -> {1}, 
 ContourShading -> {{Magenta}, None}, 
 Epilog -> {Black, PointSize[0.011], Point[{1, 1}]}, 
 ContourStyle -> {Black}, Frame -> True, FrameLabel -> {"x", "y"}]
$\endgroup$

1 Answer 1

4
$\begingroup$

Try RegionFunction:

ContourPlot[
 9359.40 + 4764.64 a^4 - 629.36 b + 478.27 b^2 - 11.27 b^3 + 
  3.62 b^4 + a^3 (-22894.13 + 134.51 b) + 
  a^2 (40827.53 - 675.68 b + 274.13 b^2) + 
  a (-32015.56 + 1087.07 b - 707.47 b^2 + 4.30 b^3), {a, 0.85, 
  1.6}, {b, -0.1, 2}, Contours -> {1}, 
 ContourShading -> {{Magenta}, None}, 
 Epilog -> {Black, PointSize[0.011], Point[{1, 1}]}, 
 ContourStyle -> {Black}, Frame -> True, FrameLabel -> {"x", "y"}, 
 RegionFunction -> Function[{a, b}, a < 1.2]]

enter image description here

$\endgroup$
2
  • $\begingroup$ It is working. Thank you so much. $\endgroup$ Commented Jul 28, 2022 at 9:49
  • $\begingroup$ @SahabubJahedi Thank you $\endgroup$ Commented Jul 28, 2022 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.