Hi everyone: I'm trying to using Sage's plot functionality to plot the honeycomb lattice: https://sites.google.com/site/makingplots4scipurposes/_/rsrc/1456789513003/gnuplot-samples-of-2d-lattices/honeycomb.png
Plotting the honeycomb lattice is slightly different from plotting a simple (like a square) lattice, as each site is technically two points, with a basis vector pointing from one point to the other within a single site. So you take your two lattice vectors and start from some point and generate all possible points from those lattice vectors. Then you go back to your starting point, shift by the basis vector, and then generate all possible points from there using the lattice vector, and then you add these two sets of points together to get the honeycomb lattice. I've figured out how to do it using points at the corner of each hexagon, like this: list_plot(flatten([[a*vector([sqrt(3)/2,1/2]) + b*vector([sqrt(3)/2,-1/2]) for a in (0..30)] for b in (0..30)] + [[a*vector([sqrt(3)/2,1/2]) + b*vector ([sqrt(3)/2,-1/2]) + vector([-1/sqrt(2),0]) for a in (0..30)] for b in (0.. 30)])) However, I was hoping to do this with lines outlining the hexagons as shown in the linked image. Would anyone know of a way to do this? Thanks! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/6125e789-d8bc-418c-a44f-c349bdb60f30%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.