# Wolfram Mathematica

## Plotting over Regions

Wolfram Language functions for visualizing functions and data now support arbitrary regions for the most control over domains and slices.

In[1]:=
`Plot3D[Sin[x + Cos[y]], {x, y} \[Element] Disk[{0, 0}, 3]]`
Out[1]=

Use DensityPlot.

In[2]:=
```\[ScriptCapitalD] = MeshRegion[{{0, 0}, {5, -2}, {3, 0}, {5, 2}}, Polygon[{1, 2, 3, 4}]];```
In[3]:=
`DensityPlot[Sin[2 x] Cos[2 y], {x, y} \[Element] \[ScriptCapitalD]]`
Out[3]=

Plot over any arbitrary region.

show complete Wolfram Language input
In[4]:=
`opts = {Axes -> False, Boxed -> False, BoxRatios -> Automatic};`
In[5]:=
```\[ScriptCapitalD] = BoundaryDiscretizeGraphics[Text["Wolfram"], _Text];```
In[6]:=
```Plot3D[Sin[x/2 + Cos[y/2]], {x, y} \[Element] \[ScriptCapitalD], Evaluate[opts]]```
Out[6]=
In[7]:=
```\[ScriptCapitalD] = ExampleData[{"Geometry3D", "Triceratops"}, "Region"];```
In[8]:=
```DensityPlot3D[ Sin[4 x] Cos[4 y] Sin[4 z], {x, y, z} \[Element] \[ScriptCapitalD], Evaluate[opts]]```
Out[8]=