## Vector Parametric Plot different from polar plot using norm of vector

I’ve defined two vector functions (2D) of real variables and then I plotted them parametrically using ParametricPlot[]. The result is the green and orange curves (the blue curve is a reference circle).

What I’m seeking however is the norm of theses functions, and I was getting weird values from the norm – so I decided to plot the resulting norm parametrically where I plotted {Norm1[u] Cos[u],Norm1[u] Sin[u]} and {Norm2[u] Cos[u],Norm2[u] Sin[u]} (u going from zero to $$2\pi$$. Here Norm1 and Norm2 are just the Norm[] method applied to the vector functions. I get this funky plot that doesn’t match the vector plot.

I cannot disclose the functions themselves as they are an on-going group work but they are functions of real variables. It seems very strange that taking the norm and then doing a polar plot like that does not recover the original plot. Any thoughts or pointers on what could be happening?

## How to create and store a plot for each iteration of a Do loop

I have created the following code below. Its purpose is for me to divide the plot into grids and for each grid I reterive the center point’s co-ordinates.

dp = DensityPlot[(E^-(x^2 + y^2)^2)^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"]; ClearAll[centers2] centers2[region_ : Disk[{0, 0}, 1]][{nc_, nr_}, {xrange_, yrange_}] :=   Select[RegionMember[region]]@centers[{nc, nr}, {xrange, yrange}] {xrange, yrange} = {{-3, 3}, {-3, 3}};  {nc, nr} = {10, 10};   Show[dp, Graphics[{White, PointSize[Medium], Circle[],     Point@centers2[][{nc, nr}, {xrange, yrange}]}]] means[n_] := MovingAverage[Subdivide[##, n] & @@ #, 2]; &;       cp = centers2[][{nc, nr}, {xrange, yrange}]  

Next I have made a Do loop that will perform calcualtions to get a variable called angle. This code is given below.

Do[point = Part[cp, i]; x = Part[point, 1]; y = Part[point, 2];   ex = (E^-(x^2 + y^2)^2)^2;   ey = ((E^-(x^2 + y^2)^2) (x^2 + y^2) Cos[2 Pi])^2;  s1 = ex^2 - ey^2;  s2 = 2 ex ey Cos[0];  inside = 2 s2/s1;  angle = ArcTan[inside], {i, Length[cp]}] 

Now what I would like to have a command inside the Do loop that I can use to plot an ellipse based on the variable angle (this will be used to give the angle that the semi major axis makes with the x axis) for very iteration of the Do loop. There is a constant semi and minor axis. The point the ellipse will have to be centered at is the point that is currently being used in the Do loop.

I am not sure how to do this inside the loop for all the iterations, however I have a found a method to plot an ellipse given as

ellipsoid[center_, {majorradius_, minorradius_}, angle_] :=   GeometricTransformation[   Ellipsoid[center, {majorradius, minorradius}],    RotationTransform[angle, center]] ad = Pi/3; sd = Graphics[{EdgeForm[{Thick}], Opacity[.75], Transparent,     ellipsoid[{0, 0}, {0.2, 0.1}, ad], Opacity[1], Red, Point[{0, 0}],}] Plot[3, sd, {x, -10, -10}] 

I also would like to store these plots as I would like to then combine all of these ellipse plots onto the densityplot I have made in the beginning

All help is much appreciated

## How to the plot results of a differential equation

Please help me to plot the solution of a differential equation as a parameter of Delta. Here is what I’ve tried.

(**Constants**)  tin := -50; tfin := 50; t := 0.05; v := 1;  (**Solve differential equation**)  sol = NDSolve[Delta == Module[{x0},   Table[x0, {x0, 0, 10}]],   {I y1'[t] == v t y1[t] +     Delta y2[t], I y2'[t] == -v t y2[t] + Delta y1[t], y1[tin] == 1, y2[tin] == 0}, {y1, y2}, {t, tin, tfin}];  (**Probability**)  Prob1[t_] :=        Re[Evaluate[y1[t] /. sol]]^2 + Im[Evaluate[y1[t] /. sol]]^2;  (**we need to plot this result as a function of delta**)  a = Plot[{Prob1[t]}, {Delta, -10, 10}] 

## Parametric plot of a function which cannot be explicitly calculated

I wish to plot a function, but I run into a problem and I cannot find similar questions here. A simplified version of plot is represented by

ParametricPlot[{g,f[x,y]}, {x,a,b},{y,c,d}]

f is quite a tricky expression and cannot be explicitly calculated for unknown x and y. Hence this plot does not work, as I believe Mathematica first explicitly calculates f[x,y] and then thereafter substitutes x and y in order to plot this. However, how can I do this such that f[x,y] substitutes the explicit values for x and y into f, as then the function can be calculated? For example, f[1,2] works absolutely fine, f[x,y] is the problem.

edit:

My code:

 cc = 0.4;  cD = 0.1;  r = 10.2;  Nstar = Floor[r];  rhos1[N_] := (1 - N/r)*Lambda^N*      Exp[eps]*Delta; rhos2[N_] := (1 - N/r)*(Lambda*Exp[g])^N*      Exp[eps]*Delta*Exp[g*Nstar]  rho = Sum[rhos1[n], {n, 1, Nstar}] +     Sum[rhos2[n], {n, Nstar + 1, Infinity}]; phi = Sum[n*rhos1[n], {n, 1, Nstar}] +     Sum[n*rhos2[n], {n, Nstar + 1, Infinity}];   phi3[Delta_] :=         Sum[n*(1 - n/r)*\[CapitalLambda]^n*          Exp[\[Epsilon]]*Delta, {n, 1, Nstar}] +         Sum[n*(1 - n/r)*(Lambda*Exp[g])^n*          Exp[eps]*Delta*Exp[g*Nstar], {n, Nstar + 1,           Infinity}];  RhoDivided3 = Simplify[rho/Delta]  h1 = cD/(RhoDivided3 + Exp[g]);   f[eps1_, g1_] := Apply[List, Reduce[cc ==    ReplaceAll[phi3[h1] + Lambda*      Exp[eps], {eps -> eps1,      g -> g1}] && Lambda > 0 && Lambda <    0.99999, Lambda], {0, 1}][[2]]  Plot[ReplaceAll[phi/rho, {Lambda -> f[-2, g],           eps -> -2}], {g, -30, -10}] 

Therefore f is obtained by solving a very complex equation for Lambda, and so cannot be determined as a function of epsilon and g, as explicit values are required.

## A problem with a supposedly simple Plot

I am trying to redraw the function F as a function of Jt. Where

$$F = {{(1 + 2{{\left| {{D_4}\left( t \right)} \right|}^2})} \over 3}$$

I should get the same result in the paper "Annals of Physics 355 (2015) 170–181", Figure 6 (b) solid-black line. But I get different results! Is there something wrong?

NB: D4(t) is defined by equation (12d) and F is defined at the bottom of page 7

ClearAll["Global*"]  xx = 0.1; J = 1.0; lam = J/xx; t = tau/J; k = Sqrt[lam^2 + J^2];  D4 = ((J^22)/(4*(k^2 + lam*k)))*     Exp[-1 I*(lam + k)*t] + ((J^2)/(4*(k^2 - lam*k)))*     Exp[-1 I*(lam - k)*t] - (1/2)*Cos[J*t];  F = (1 + 2*Abs[D4]^2)/3.0;  Plot[F, {tau, 0, 50}, PlotRange -> {0, 1}] 

## How to plot the solutions of $f(z,a)=0$ on the complex plain of $z$?

I have an equation $$f(z,a)=0$$ where $$z$$ is a complex variable $$\frac {56}{10} and $$a$$ is a real variable $$0.

I want to plot solutions of this equation on the complex plain $$z$$ as $$a$$ increases from $$0$$ to $$\pi$$, and show the behavior of $$z$$ by changing the color of the curve (as $$a$$ increases, the curve changes from blue to red), something like this plot

f[z_,a_]:=9 + 4 Cos[a - (273 z)/50] - 4 Cos[a - 2 z] - 2 Cos[2 z] -   3 Cos[(173 z)/50] + Cos[4 z] - 2 Cos[(273 z)/50] -   3 Cos[(373 z)/50] - 4 Cos[a + 2 z] + 4 Cos[a + (273 z)/50] -   4 I Sin[a - (273 z)/50] + 4 I Sin[a - 2 z] - 2 I Sin[2 z] -   3 I Sin[(173 z)/50] + I Sin[4 z] - 2 I Sin[(273 z)/50] -   3 I Sin[(373 z)/50] - 4 I Sin[a + 2 z] + 4 I Sin[a + (273 z)/50];   f[z,a]==0  56/10 <z<\[Pi] 0<a<\[Pi]  

## How to plot this dataset?

I have the following list of 3by3 dimension as an example (the listtot gives me the corresponding energy (ex:37.752812298486035) for each angle set (ex:{0., 0.3141592653589793, 0.6283185307179586, 0.9424777960769379, 1.2566370614359172, 1.5707963267948966}) of 6 electrons) and I want to plot the data to show clearly how the energy changes when the electrons’ spins maintaining different angles with respect to each other (to do that I thought of using ListPlot3D, but if you have better ideas I appreciate that a lot):

  listtot = {{{37.752812298486035, {0., 0.3141592653589793,    0.6283185307179586, 0.9424777960769379, 1.2566370614359172,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}, {37.752812298486035, {0., 0.3141592653589793,    0.6283185307179586, 0.9424777960769379, 1.2566370614359172,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}, {37.752812298486035, {0., 0.3141592653589793,    0.6283185307179586, 0.9424777960769379, 1.2566370614359172,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}}, {{37.752812298486035, {0., 0.3141592653589793,    0.6283185307179586, 0.9424777960769379, 1.2566370614359172,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}, {37.11781609966486, {0., 0.2630862667406051,    0.6283185307179586, 0.9424777960769379, 1.2566370614359172,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}, {34.125297721219795, {0., 0.2630862667406051,    0.6283185307179586, 0.9424777960769379, 1.4818657793200891,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}}, {{33.522683744885754, {0., 0.2630862667406051,    0.6283185307179586, 0.9424777960769379, 1.5233731698273567,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}, {33.522683744885754, {0., 0.2630862667406051,    0.6283185307179586, 0.9424777960769379, 1.5233731698273565,    1.5707963267948966}, {1, 2, 3, 4, 5,    6}}, {33.39466567365792, {0., 0.2630862667406051,    0.6283185307179586, 0.5455129752218801, 1.5233731698273565,    1.5707963267948966}, {1, 2, 3, 4, 5, 6}}}}; 

I should rearrange my data as following to use it in ListPlot3D:

  Thread[{#3, #2, #1}] & @@ listtot[[1]][[1]] 

Now for every listtot[[i]][[j]] in which i and j are changing between 1&3, I need to store the data on a different list and plot all of them in one graph. I was thinking about writing the code to do the following procedure (which I need help with):

I need to write something like:

 ListPlot3D[{list1, list2, list3,...}, InterpolationOrder -> 0,   AxesLabel -> {"electron index", "spin angle", "energy"},   BaseStyle -> 12, ImageSize -> 400] 

and I am asking for a way to write {list1, list2, list3,…,list9} or in other words to store the data in various lists: list1,… and plot them ;

again I appreciate any other method in case you have different ideas to show the data.

## Plot an array of complex numbers

In version 12.0 Mathematica introduced a new function ComplexPlot. So how can I plot an array of complex numbers, with ArrayPlot, that colours the numbers in a similar way to ComplexPlot?

## Excluding points from 2d plot

I am trying to plot certain regions using ContourPlot and RegionPlot in two dimensions. From these implicitly defined contours I need to exclude certain points. In the documentation of Exclusions it says that for a domain defined by $$n$$ variables, exclusions must be of dimension $$n-1$$. Since points are dimension 0 objects, it does not work to exclude them naively. My idea to circumvent this issue was to include short line segments through the points and exclude the lines instead, which would not be a problem with my plot. However, I do not find anywhere how this can be done. An example for a plot can be found in this question. Any help is much appreciated.

## How can I switch off PlotRangeClipping from one side of the plot?

I want to make PlotRangeClipping -> True on each side of the plot (see code below) except the top side must be PlotRangeClipping -> Flase, is that possible?

Plot[{x, -x}, {x, -5, 5}, PlotRange -> {{-1, 0}, {-3, 3}},   Frame -> True,PlotLegends ->    Placed[LineLegend[{"Y1", "Y2"}, LegendLayout -> {"Row", 1},      LegendMarkerSize -> 20], {{0.5, 0.5}, {0.5, -1.8}}],   PlotRangePadding -> None, PlotRangeClipping -> False,   ImagePadding -> 80]   `