So I tried plotting an annulus in two ways:


Why does RegionPlot give a fractal looking thing? (see below for when a=1; b=5;) RegionPlot image

*note, I used wolfram programing lab.

  • $\begingroup$ What are $a$ and $b$ here? $\endgroup$ – mjw Mar 29 '19 at 20:03
  • $\begingroup$ Try a=1; b=5; But really any values give something weird $\endgroup$ – Ion Sme Mar 29 '19 at 20:08
  • 4
    $\begingroup$ Because it discretized the region in order to plot it, and it is showing the underlying triangulation mesh. $\endgroup$ – MarcoB Mar 29 '19 at 20:12
  • 1
    $\begingroup$ @IonSme I guess they just use different defaults for plotting; the Graphics result is "normal-looking" though. $\endgroup$ – MarcoB Mar 29 '19 at 20:17
  • 2
    $\begingroup$ There are some subtle differences going on how Mma shows Regions and RegionPlot Graphics. Also Regions can be defined analytically via ImplicitRegion or ParametricRegion or as 'flat' MeshRegions. DiscretizeRegion converts every type to a MeshRegion and some functions like RegionPlot might use something similar to DiscretizeRegion under the hood to make plotting easier, whose discretization it for some reason decides to show. Like others wrote you can use ImplicitRegion to get a different (not discretized) look in your case. $\endgroup$ – Thies Heidecke Mar 29 '19 at 21:19
 a = 1; b = 5;

Please try plotting with Region[]. These look okay to me:

 Region[RegionDifference[Disk[{0, 0}, b], Disk[{0, 0}, a]]]

enter image description here

 Region[Annulus[{0, 0}, {a, b}]]

enter image description here

Here is a decent plot, with RegionPlot:

 RegionPlot[x^2 + y^2 > 1 && x^2 + y^2 < 25, {x, -6, 6}, {y, -6, 6}]

enter image description here

Here it is (again) with Graphics[]:

 Graphics[{LightBlue, Annulus[{0, 0}, {a, b}]}]

enter image description here

  • $\begingroup$ Hmmm, that worked, but why is RegionPlot so funky? $\endgroup$ – Ion Sme Mar 29 '19 at 20:13
  • 1
    $\begingroup$ I think MarcoB mostly answers this below your question. So we can then ask: Why does RegionPlot use one algorithm, and Region another? RegionPlot seems to like functions as inputs, and also likes to have the $x$ and $y$ ranges speciifed ... $\endgroup$ – mjw Mar 29 '19 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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