I have this surface I plotted using Latex but the edge is ragged. Anyone knows how to fix that? I tried increasing the number of samples but the raggedness persists and the computing time becomes too much.
begin{tikzpicture}
begin{axis}[
view={67.5}{30},
xmin=0, xmax=1, xtick={0,0.33,0.66,1}, xticklabels={0,$nicefrac{1}{3}$,$nicefrac{2}{3}$,1}, xlabel=$s_{1}$,
ymin=0, ymax=1, ytick={0,0.33,0.66,1}, yticklabels={0,$nicefrac{1}{3}$,$nicefrac{2}{3}$,1}, ylabel=$s_{2}$,
zmin=0.01, zmax=1.2, zlabel={$H(s_{i})$}, every axis z label/.style={at={(ticklabel cs:1.05)}, anchor=south}, minor z tick num=1,
colormap/cool, colorbar,
domain=0:1,
restrict z to domain=0:1.2,
samples=50, ]
addplot3[surf, ] {-x*ln(x) - y*ln(y) - (1-x-y)*ln(1-x-y)};
end{axis}
end{tikzpicture}}
Image here:
Again I tried increasing number of samples but didn’t really help
New contributor
frencho is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.