I am plotting many regions with RegionPlot. I would like to label each region as I plot it so that I get something that looks like figure made with the following code:
Show[
RegionPlot[x > y, {x, 0, 1}, {y, 0, 1}],
RegionPlot[x < y, {x, 0, 1}, {y, 0, 1}],
Graphics[Text["B", {0.6, 0.2}]],
Graphics[Text["A", {0.2, 0.6}]]
]
However, as the sets of inequalities are quite complicated and there are many regions, I would like to automatically determine a reasonable place to put each label so that it is in the middle of each region.
Is there a simple way to do this? I could manually find a point within each region, but that would be a pain and wouldn't necessarily solve the problem of centering the text within the region.
RegionPlot[{x > y, x < y}, {x, 0, 1}, {y, 0, 1}, PlotLegends -> "Expressions"]
$\endgroup$