Group Abstract Group Abstract

Message Boards Message Boards

1
|
9.1K Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Issue when plotting rectangular region with RegionPlot?

POSTED BY: Karl Krieger
5 Replies
POSTED BY: Martijn Froeling

Murray, thank your for your reply. As I found a workaround already (defining PlotRange explicitely, the middle plot), I posted my question rather out of curiosity what is going on under the hood of RegionPlot. I had found indeed a StackExchange post on this issue (https://mathematica.stackexchange.com/questions/156467/extra-edges-added-in-regionplot). Some comments there recommended increasing PlotPoints and/or MaxRecursion levels in RegionPlot, which I had already tried before and apparently do not resolve this behaviour at all. A helpful suggestion was to add Option Mesh->All to RegionPlot to show the grid used to discretize the region for plotting. As I suspected, RegionPlot appears to create different meshes depending on how the region was defined and how its PlotRange option was set; see below. I did not find this mentioned in the documentation. Might be helpful to add an explanation there. enter image description here

POSTED BY: Karl Krieger

The missing corners on the left-hand plot are a not uncommon phenomenon when one is trying to use equalities for regions. I'm sure this has popped up before on Wolfram Community or mathematica.stackexchage.com but at the moment am not finding it.

In any case, the documentation does not show this combination RegionPlot[ImplicitRegion[,,,]...].
However, the following (even with omitting PlotRange -> Full, which is superfluous here) gives the correct graphic.

RegionPlot[0 <= x <= 5 && 0 <= y <= 10, {x, 0, 5}, {y, 0, 10}, 
 Frame -> True, AspectRatio -> Automatic, PlotRange -> Full]
POSTED BY: Murray Eisenberg
Posted 1 year ago

And here's an EVEN SIMPLER example. (Still Mathematic 12.2 on Windows 10)

Attachments:
POSTED BY: David Golber
Posted 1 year ago

Here's another example, even simpler. Mathematica 12.2 running on Windows 10

Attachments:
POSTED BY: David Golber
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard