Tag Info

New answers tagged

3

Try the Epilog option ContourPlot[z, {x, -3, 3}, {y, -3, 3}, Epilog -> First@ VectorPlot[Evaluate@Grad[z, {x, y}], {x, -3, 3}, {y, -3, 3}] ]


1

The output of the Plot commands are Graphics objects which are by default shown graphically by the notebook interface -- but you are free to collect it and do other stuff. Also, since you seem to be new to Mathematica: You can use Grad to compute the gradient. z = x^2 - y^2; Show[{ ContourPlot[z, {x, -3, 3}, {y, -3, 3}], VectorPlot[Evaluate@Grad[z, {x, ...


2

Try this PIC1 = VectorPlot[{2 x, -2 y}, {x, -3, 3}, {y, -3, 3}]; PIC2 = ContourPlot[x^2 - y^2, {x, -3, 3}, {y, -3, 3}, ColorFunction -> "DeepSeaColors", PlotLegends -> Automatic]; Show[PIC2, PIC1]


1

You want divergence widget? I has Div, is better: Div[{f[r], 0, 0}, {r, θ, ϕ}, "Spherical"] (* 2 f[r]/r + f'[r] *) Is divergence of spherically symmetric central field $f(r)\hat r$.



Top 50 recent answers are included