Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When plotting an expression using pgfplots, there are strange artefacts in places where the z-values are too big for the current axis. How do I fix it? Is there an equivalent to y domain for the z-axis?

\documentclass{article}

\usepackage{pgfplots}

\begin{document}
  \begin{tikzpicture}
  \begin{axis}[
    xmin=-1.5,xmax=1.5,
    ymin=-1.5,ymax=1.5,
    zmin=0, zmax=1,
    view={40}{20}]
    \addplot3[domain=-1.5:1.5, y domain=-1.5:1.5,
    surf,samples=40,opacity=0.3]
    {1-x^2-y^2};
  \end{axis}
  \end{tikzpicture}
\end{document}

enter image description here

share|improve this question

closed as too localized by doncherry, cmhughes, Peter Grill, Brent.Longborough, lockstep Jan 15 '12 at 11:53

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I can't reproduce this problem with Miktex 2.9 and using SumatraPDF or Adobe Acrobat X. Everything is clipped properly. –  percusse Jan 14 '12 at 15:17
    
If I use TexLive 2011 and the IDE Gummi then I get the same problem as Psirus. If I use TexLive 2011 and the IDE TexWorks then everything is clipped properly. –  DJP Jan 14 '12 at 15:28
    
Seems to be reader related. I was using evince, but it’s fine under Adobe Acrobat. Thank you guys. What’s the protocol here…close, delete, answer? –  Psirus Jan 14 '12 at 15:58
    
@Psirus: Close as too localized. I'll submit the first vote. –  doncherry Jan 14 '12 at 16:11

Browse other questions tagged or ask your own question.