7
$\begingroup$

In a very simple example I try to define a rectangular region

u = 1/Sqrt[2]; reg = ImplicitRegion[(-1 <= x <= 1 + u) && (-1 <= y <= 0 ) , {x, y}] RegionPlot[ reg ] 

enter image description here

Obviously the plot isn't complete.

What's wrong? Thanks!

$\endgroup$
7
  • $\begingroup$ I'm surprised that it returned anything. The documentation for RegionPlot shows its argument as a predicate rather than a region. For example, RegionPlot[reg[[1]], {x, -1, 1 + u}, {y, -1, 0}]. For the region use Region[reg, Frame -> True, AspectRatio -> 1] $\endgroup$ Commented Dec 22, 2019 at 20:42
  • $\begingroup$ @BobHanlon Thanks, but documentation of ImplicitRegion show several examples like \[ScriptCapitalR] =ImplicitRegion[ x^6 - 5 x^4 y + 3 x^4 y^2 + 10 x^2 y^3 + 3 x^2 y^4 - y^5 + y^6 ==0, {x, y}];RegionPlot[\[ScriptCapitalR]] $\endgroup$ Commented Dec 22, 2019 at 20:49
  • $\begingroup$ Repeatable in version 12.0 on Win 10 Ent. Post to WRI support to see if it is a bug. $\endgroup$ Commented Dec 22, 2019 at 21:16
  • $\begingroup$ I can confirm the issue on V12.0.0 (macOS). DiscretizeRegion[reg, Frame -> True] and RegionMeasure[reg] work correctly though. $\endgroup$ Commented Dec 22, 2019 at 21:20
  • $\begingroup$ I discovered these flaws of RegionPlot[] back in version 11.3 - see mathematica.stackexchange.com/questions/180959/… $\endgroup$ Commented Dec 22, 2019 at 23:24

1 Answer 1

4
$\begingroup$
  • Method -> {"DiscretizationMethod" -> "Symbolic"} work for this case.
u = 1/Sqrt[2]; reg = ImplicitRegion[(-1 <= x <= 1 + u) && (-1 <= y <= 0), {x, y}] RegionPlot[reg, Method -> {"DiscretizationMethod" -> "Symbolic"}] 

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks, I didn't know this option $\endgroup$ Commented Mar 27, 2024 at 17:16

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.