I am using ListDensityPlot
with RegionFunction
(MMA12.3 on Win 64) but it takes too long
region = Polygon[{{-(\[Pi]/3), -(\[Pi]/Sqrt[3])}, {-((2 \[Pi])/3),
0}, {-(\[Pi]/3), \[Pi]/Sqrt[3]}, {\[Pi]/3, \[Pi]/
Sqrt[3]}, {(2 \[Pi])/3,
0}, {\[Pi]/3, -(\[Pi]/Sqrt[3])}, {\[Pi]/
3, -(\[Pi]/Sqrt[3])}, {-(\[Pi]/3), -(\[Pi]/Sqrt[3])}}];
datr = Flatten[
ParallelTable[{x, y, Cos[x] Sin[x y]}, {x, -2.5, 2.5,
0.05}, {y, -2.5, 2.5, 0.05}], 1];
here is the result without RegionFunction
ListDensityPlot[datr,
ColorFunction -> (Blend[{Orange, Gray, Black},
Rescale[#, {-1, 1}]] &), InterpolationOrder -> 0,
ColorFunctionScaling -> False,
ClippingStyle -> Automatic] // AbsoluteTiming
and with
ListDensityPlot[datr,
ColorFunction -> (Blend[{Orange, Gray, Black},
Rescale[#, {-1, 1}]] &), InterpolationOrder -> 0,
ColorFunctionScaling -> False, ClippingStyle -> Automatic,
RegionFunction ->
Function[{x, y}, {x, y} \[Element] region]] // AbsoluteTiming