# ListDensityPlot and RegionFunction

I have the following ListDensityPlot :

ListDensityPlot[
Table[Y^2 + Z^2, {Y, -1, 1, Pi/300}, {Z, -1, 1, Pi/300}],
ColorFunction -> "SunsetColors",
RegionFunction -> Function[{x, y, z}, (0.74)^2 < x^2 + y^2 < (0.785)^2 ],
PlotLegends -> Automatic, DataRange -> {{-1, 1}, {-1, 1}}] Here I have limited the ListDensityPlot over a crown. My problem is that I want to limit the ListDensityPlot following this multiple Plot bellow :

Plot[{1/2 (ArcCos[1 - Cos[2 kx]]), -1/2 (ArcCos[1 - Cos[2 kx]])},
{kx,-1, 1}, AxesLabel -> {"kx", "ky"}] Is there a way to do this with RegionFunction like I did for the crown, or with an other way ?

@shrx Why the thickness is not the same at right and top with your code ? Is there a way to rectify that ?

Thank you

Geoffroy

Maybe something like this:

ListDensityPlot[
Table[Y^2 + Z^2, {Y, -1, 1, Pi/300}, {Z, -1, 1, Pi/300}],
ColorFunction -> "SunsetColors",
RegionFunction ->
Function[{x, y, z},
TrueQ[0 <= y + 1/2 (ArcCos[1 - Cos[2 x]]) <= 0.785 - .74] \[Or]
TrueQ[.74 - 0.785 <= y - 1/2 (ArcCos[1 - Cos[2 x]]) <= 0]],
PlotLegends -> Automatic, DataRange -> {{-1, 1}, {-1, 1}}] // Quiet


That Quiet is there because otherwise mathematica complains about the comparison of complex numbers. The output looks like this: • Thanks you for your help ! My problem is solved now :) Mar 20, 2015 at 9:03