# List of Inequalities in RegionPlot with different colors [duplicate]

Starting from the example of the Documentation:

RegionPlot[{x^2 < y^3 + 1, y^2 < x^3 + 1}, {x, -2, 5}, {y, -2, 5}]


Which gives a nice plot with two different colors for each region: I now want to provide a List of conditions to the routine instead, hence writing something similar to

a = {x^2 < y^3 + 1, y^2 < x^3 + 1};
RegionPlot[a, {x, -2, 5}, {y, -2, 5}]


which should, in my naive view be equivalent but results in a loss of color differentiation: So the question is: How can I pass the list to RegionPlot in order to get the same result as directly writing the list as an argument?

Note that for a simple plot the behavior is as I would have expected it:

a = {x^2, x^3};
Plot[a, {x, 0, 1}]


(cannot show because of the link limit)

edit: The behavior is new in Version 10.4.1 and was not present in 10.0 on Windows. I assumed there was a change in syntax. In 10.0 on Windows however there is a bug with the BoundaryStyle directive. It is ignored for a list containing more than 16 regions (for some obscure reason).

b = {False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False , False, False,
aS <= 0 && bP >= 0, aS >= 0 && bP >= 0 }
RegionPlot[b, {aS, -0.5, 1.}, {bP, -1.5, 1.5}, PlotPoints -> 50,
FrameLabel -> {"S", "P"},
PlotStyle -> colors,
BaseStyle -> {FontSize -> 22},
BoundaryStyle -> Directive[Black, Thick], Mesh -> None]

• No such behavior on 10.0 for Mac OS X x86 (64-bit) (December 4, 2014), use ClearAll["Global*"] FHS – user9660 Apr 29 '16 at 16:57
• Sorry for not mentioning that before. The behavior is new in Version 10.4.1 and was not present in 10.0 on Windows. I thought there was a change in syntax. In 10.0 on Windows however the BoundaryStyle directive is ignored for a list containing more than 16 regions (for some obscure reason). – Andre Scholich Apr 29 '16 at 16:59
• @Andre Because of the HoldAll attribute of the plotting functions, you need to evaluate the list $a$ so RegionPlot recognizes that it is a list and attempts to use multiple colors: RegionPlot[Evaluate@a, {x, -2, 5}, {y, -2, 5}]. – MarcoB Apr 29 '16 at 17:39
• For instance the problem was discussed in the case of Plot before: mathematica.stackexchange.com/q/1731/27951 – MarcoB Apr 29 '16 at 17:40

Note the Attributes of RegionPlot

Attributes[RegionPlot]


Since RegionPlot and other plot functions have attribute HoldAll you need to use Evaluate
a = {x^2 < y^3 + 1, y^2 < x^3 + 1};
` 