Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to get plot for the band structure for graphene.

d = 10; (*Plot range*) 
coupling := {{0, 2 Cos[Sqrt[3]*(#1)/2]*Cos[#2/2] + Cos[#2] + 
I (2 Cos[Sqrt[3]*(#1)/2]*Sin[#2/2] - Sin[#2])}, 
{Conjugate[ 2 Cos[Sqrt[3]*(#1)/2]*Cos[#2/2] + Cos[#2] + 
   I (2 Cos[Sqrt[3]*(#1)/2]*Sin[#2/2] - Sin[#2])], 0}} &;
Plot3D[Eigenvalues[coupling[kx, ky]][[1]], {kx, -d, d}, {ky, -d, d}] (*Discontinuous*)
Plot3D[(Eigenvalues[coupling[kx, ky]][[1]])^2, {kx, -d, d}, {ky, -d, d}] (*Continuous*)

I am not able to understand why the surface in the first plot is coming out discontinuous; i.e., it has some gaps in the surface plot, whereas there are no gaps in the second plot, which simply plots the square of the function shown in the first plot.

There is no physics that explains the gaps. Also, the effect is not periodic/predictable. By that I mean that on changing d, I am getting very different patterns of gaps all over the place.

Is there some problem with my code or is 3D plot working incorrectly? How do I get rid of this error?


I am NOT talking about the spike at (0,0). I am attaching a picture of my plot for clarity. I am talking about the "ribbons" missing from the surface.

enter image description here

There are no "ribbons" in the case of the squared plot.

enter image description here

share|improve this question
It's the spike at $(0,0).$ Try adding Exclusions->{{0,0}} as an option to the discontinuous plot. –  gpap Oct 30 '13 at 10:53
That is not the issue for me. I hope the question is clearer after the EDIT. –  varun Oct 30 '13 at 12:40
With Exclusions->{{0,0}} I don't get any missing ribbons, can you clarify how it doesn't work? –  ssch Oct 30 '13 at 12:54
The ribbons go away if you plot ev[kx_?NumericQ, ky_?NumericQ] := Eigenvalues[coupling[kx, ky]][[1]], too. They come from switching between branches in the symbolic solution for the eigenvalues, and Plot3D uses the symbolic expression for some of its work. I get no ribbons with ssch's solution in V9.0.1 and V8.0.4. –  Michael E2 Oct 30 '13 at 13:07
The Exclusions->{{0,0}} method works for me, although I am not sure why. @MichaelE2 , I am not sure how your explanation accounts for the fact that the "ribbons" are missing in the squared plot without accounting for the branch-switch explicitly. –  varun Oct 30 '13 at 13:41
show 4 more comments

1 Answer 1

This is just to get the answer given in the comments on record.

The solution to the ragged plot problem is to make two changes to the the OP's code

  1. Define a function

    eigen[kx_?NumericQ, ky_?NumericQ] = Evaluate @ Eigenvalues[coupling[kx, ky]][[1]];  
  2. Plot the function eignen[kx, ky] with the options PlotPoints -> 100, Exclusions -> {{0, 0}}.

    Plot3D[eigen[kx, ky], {kx, -d, d}, {ky, -d, d}, 
      PlotPoints -> 100, Exclusions -> {{0, 0}}] 


share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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