Qurak

Show the divergence as a background density

Example 2 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
div[x_, y_] = Div[{Cos[x + y ^ 3], Sin[y + x ^ 3]}, {x, y}];

No output - this step sets something up for the next one.

Step 2
StreamDensityPlot[{{Cos[x + y ^ 3], Sin[y + x ^ 3]}, div[x, y]}, {x, -2, 2}, {y, 0, 2}, StreamPoints -> Fine, ColorFunction -> "MintColors", MaxRecursion -> 2, StreamStyle -> Black, StreamColorFunction -> None]
Output
-Graphics-

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client