All published worksheets from http://sagenb.org
p=var('p') q=var('q') H=-p*log(p,2)-q*log(q,2)-(1-p-q)*log(1-p-q) plot3d(H, (p,0,1), (q,0,1))