2
$\begingroup$

In this very simple example a region consisting of two lines forming a right angle is defined as

reg = ImplicitRegion[(1 <= r < 3 && z == 0) || (r == 3 &&0 <= z <= 2), {z, r}];

but

RegionPlot[reg ]

enter image description here

only shows vertical part of it.

I tried PlotRange, PlotPoints without success and checked

RegionMember[reg, {1, 3}] (* True*)

How to show the complete region? Thanks!

$\endgroup$
2
  • $\begingroup$ PlotRange->{{-1,10},{-1,10}} ? $\endgroup$
    – rhermans
    Commented Jul 8, 2022 at 13:48
  • 1
    $\begingroup$ Thanks, no effect in Mathematica v12.2 $\endgroup$ Commented Jul 8, 2022 at 13:53

2 Answers 2

2
$\begingroup$

This seems to work in V12.2 (Mac). It does what seems obivous and is probably done in V13 (discretize each component represented by the arguments to Or):

RegionPlot[
 List @@ Thread[reg, Or] // Map@DiscretizeRegion // RegionUnion // 
  Evaluate]
$\endgroup$
1
  • $\begingroup$ Really clever, thank you very much! $\endgroup$ Commented Jul 10, 2022 at 16:10
1
$\begingroup$
$Version
(* 13.1.0 for Microsoft Windows (64-bit) (June 16, 2022) *)

RegionPlot not always automatic discretize the region.

DiscretizeRegion[reg, {{-10, 10}, {-10, 10}}]
RegionPlot[%]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks! In v12.2 your solution doesn't work unfortunately. What's your Mathematica version? $\endgroup$ Commented Jul 8, 2022 at 13:29

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.