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

  • 3
    $\begingroup$ It's the spike at $(0,0).$ Try adding Exclusions->{{0,0}} as an option to the discontinuous plot. $\endgroup$
    – gpap
    Oct 30, 2013 at 10:53
  • $\begingroup$ That is not the issue for me. I hope the question is clearer after the EDIT. $\endgroup$ Oct 30, 2013 at 12:40
  • 1
    $\begingroup$ With Exclusions->{{0,0}} I don't get any missing ribbons, can you clarify how it doesn't work? $\endgroup$
    – ssch
    Oct 30, 2013 at 12:54
  • $\begingroup$ 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. $\endgroup$ Oct 30, 2013 at 13:41
  • $\begingroup$ This shows that the branch switches are consistent across plot scales: 'Module[{cp}, cp[d_] := ContourPlot[ First[Eigenvalues[coupling[kx, ky]]], {kx, -d, d}, {ky, -d, d}, ImageSize -> 300]; Grid[{cp /@ {5, 10, 15}}] ]' $\endgroup$ Oct 30, 2013 at 14:11

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}}] 



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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