How can I change the color in RegionPlot?

Reply the comment

RegionPlot[y >= 1/(1 + x^2), {x, -10, 10}, {y, -10, 10}, 
 ColorFunction -> (Blend[{White, Red}, #2] &), 
 ColorFunctionScaling -> True]

enter image description here

Like this?

RegionPlot[y >= 1/(1 + x^2), {x, -10, 10}, {y, -10, 10}, 
 ColorFunction -> Function[{x, y}, GrayLevel[1 - y]], 
 ColorFunctionScaling -> True]
RegionPlot[y >= 1/(1 + x^2), {x, -10, 10}, {y, -10, 10}, 
 ColorFunctionScaling -> True, 
 ColorFunction -> Function[{x, y}, ColorData["PigeonTones"][1 - y]]]

enter image description here


You can also use Texture[LinearGradientImage[...]] as the setting for PlotStyle:

RegionPlot[y >= 1/(1 + x^2), {x, -10, 10}, {y, -10, 10}, 
 PlotStyle -> Texture[LinearGradientImage[{Bottom, Top} -> {White, Red}]]]

enter image description here

With 12.2 we can also use LinearGradientFilling

RegionPlot[ImplicitRegion[y >= 1/(1 + x^2), {{x, -10, 10}, {y, -10, 10}}], 
  PlotStyle -> LinearGradientFilling[{White, Red}, Top], 
  BoundaryStyle -> Thick, PlotRange -> {-10, 10}, PlotPoints -> 150] 

enter image description here

Tags:

Color

Plotting