I am trying to use StreamPlotDensity to find the direction of my electric field at a point x,y. My electric field is given as
ElecticField={((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[2 Pi])^2 + ((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[2 Pi])^2}
Now when I use PlotDensity for this electric field with the code
DensityPlot[{((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[2 Pi])^2 + ((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[2 Pi])^2}, {x, -3, 3}, {y, -3, 3}, PlotTheme -> "Minimal",
PlotRange -> All, PlotPoints -> 50, ColorFunction -> "Rainbow"]
To get
Now when I use the following StreamDensityPlot code
StreamDensityPlot[{((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[
2 Pi]), ((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[2 Pi])}, {x, -3,
3}, {y, -3, 3}, PlotTheme -> "Minimal", PlotRange -> All,
ColorFunction -> "Rainbow"]
I get the image
Now my issue is that the image is not showing the direction lines for all parts of the plot and that the plot is not looking how the DensityPlot one does. Can you please provide some help regarding this
Essentially what I am trying to do is create a plot of my electric field and show the direction of it at a point x,y.
Thank you for all your help
t = {((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[ 2 Pi]), ((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[2 Pi])}; t[[1]] == t[[2]]
has identical x and y components $\endgroup$