# Problems with the plot of a function. [duplicate]

For some reason the result of Plot of the following function:

Clear[x]; Clear[a]; Clear[b];

m={{(1+1/k)/x^2,1/k},{-1/k,x^2(1-1/k)}};
{{l1,l2},{v1,v2}}=Eigensystem[m];
g = Solve[{0,1}==a v1 + b v2,{a,b}];
alpha = First[a /. g];
beta = First[b /. g];
d[x_, h_, n_]:= alpha l1^n v1 + beta l2^n v2 /. k-> (2 Log[x])/h
Plot[Last[d[x,4,8]], {x,6.78,8}, PlotStyle->Orange]


is this

How can I remove those blank spaces to see the plot of a continuous function?

• Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) 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! 3) As you receive help, try to give it too, by answering questions in your area of expertise. – bbgodfrey Feb 19 '15 at 15:03
• The plot displays a nice continuous curve in my machine. Try starting a fresh Mathematica session. ¡Suerte! – Dr. belisarius Feb 19 '15 at 15:15
• I started a new session and the problem remains the same, but now I know it is a particular problem of mine. ¡Gracias! – Antoñito Feb 19 '15 at 15:25
• The problem are imaginary residuals. You need to Chop your function, then everything is fine. – Yves Klett Feb 19 '15 at 15:39
• @Mr.Wizard super - will take a look asap. – Yves Klett Feb 19 '15 at 19:29

Your function seems to produce values with small imaginary components, which Plot deliberately ignores. If you Chop your results, the function seems to plot just fine:
m = {{(1 + 1/k)/x^2, 1/k}, {-1/k, x^2 (1 - 1/k)}};