1
votes

I am trying to use gnuplot to plot the graphene band structure as both surfaces and a countour plot at the base, set with set contour base, but I can't get rid of some axis lines and the plane where the contour is drawn is too far away from the surfaces when I place them in the adequate viewing angle.

Here is the code to plot the graph

# Setting ranges and function parameters
set xrange [-.55:.55]
set yrange [-1:1]

t=-3.033 s=0.129 a=1.43 * sqrt(3)

# Auxiliary functions
kx(x,y) = (2*pi/a) * (cos(pi/6)*x + sin(pi/6)*y) ky(x,y) = (2*pi/a) * (cos(pi/6)*x - sin(pi/6)*y)    
w(x,y) = sqrt(1+4*cos(0.5*sqrt(3)*kx(x,y)*a)*cos(0.5*a*ky(x,y)) + 4*(cos(0.5*ky(x,y)*a))**2)

#functions to be plotted
e(x,y) = (t*w(x,y))/(1+s*w(x,y))
e_estrela(x,y) = (-t*w(x,y))/(1-s*w(x,y))

# Setting up 3D plot appearance
set hidden3d
set contour base set cntrparam levels discrete 0,0.5,1,2,4,8
set view 75, 31, 0.601098, 1.4385
set isosamples 60

# Removing unwanted stuff
unset xtics
unset ytics
unset ztics
unset key 

splot e_estrela(x,y), e(x,y)

And the output I get (with the pngcairo terminal, but that's not relevant, I guess) is: Output from script above

Is it possible to draw the contour base plane closer to the surfaces? And how about removing those vertical black lines?

For the first part, I tried playing wioth set zrange with no success. The base plane seems to be drawn a certain z-distance below the lowest z-range limit everytime.

Ideas? Thanks in advance!

1

1 Answers

3
votes

To adjust the distance between your data and the xy-plane use the option

set xyplane relative <value>

where <value> gives you the distance between the xy-plane and the minimal z-value in relative fraction of the hight of your plot. So <value>=0 sets the distance to zero, <value>=0.5 to half the hight.

To control the border use set border where each border line is represented by bits. Please refers to the documentation for more details. In your case I would suggest:

set border 127+256+512 # or set border 1023-128
set grid #forces borders from xy-plane to plot