3
$\begingroup$

I am trying to use the parametricplot to switch the x and y axis, but seems it not working. Also, since ParametricPlot[{w, k1}, {w, 0, 2*10^16}] and Plot[k1,{w, 0, 2*10^16}] should be equivalent and yields the same result, why it still not working. Thanks very much for any help.

ebp = 9;
hbar = 6.582119*^-16;
wp = ebp/hbar;
ϵi = 1;
ϵinfi = 1;
τ = 3.3*^-14;
ϵc1 = ϵinfi (1 - wp^2/w^2);
ϵc2 = ϵinfi wp^2/(w^3 τ);
ϵcc = ϵc1 + ϵc2 I;
ϵspc = Refine[ComplexExpand[(ϵi + ϵcc)/(ϵi ϵcc)], w > 0 && Element[w, Reals]];
c = 3*^8;
k = w/(c Sqrt[ϵspc]);
k1 = Refine[Re[k], w > 0 && Element[w, Reals]];
ParametricPlot[{k1, w}, {w, 0, 2*10^16}]
ParametricPlot[{w, k1}, {w, 0, 2*10^16}]
Plot[k1,{w, 0, 2*10^16}]
k2 = Im[k];
graph1 = Plot[{k1, k2}, {w, 0, 2*10^16}, PlotRange -> Full];
Show[graph1 /. x_Line :> Reverse[x, 3], PlotRange -> All, AxesLabel -> {"k", "w"}, ImageSize -> Medium, AspectRatio -> 1]
$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 0) Browse the common pitfalls question 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Dr. belisarius Mar 29 '16 at 17:56
3
$\begingroup$
ParametricPlot[{w, k1 }, {w, 0.1, 2*10^16}, AspectRatio -> 1]

Mathematica graphics

ParametricPlot[{k1, w }, {w, 0.1, 2*10^16}, AspectRatio -> 1]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Oh, yes. That's what am i missing, Thanks so much. $\endgroup$ – Andrew Mar 29 '16 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.