プロット内の軸を変更するにはどうすればよいですか?

プロット内の軸を変更するにはどうすればよいですか?

私はsourceforge.netからコピーしたコードで表面をプロットしました。与えられた軸のラベルを変更したいのですが、Tex文書に組み込むと正しくレンダリングされません。軸には、すべてのポイントがx = 0より下にあるという事実を描画したいのです。同様にプロットすると、

\addplot3[surf] {-x^2 - y^2}

すべてのポイントが z=0 より上にあることを表示したいです。pgfmanual.pdf を参考にしましたが、今のところ役に立ちません。また、プロットを拡大または縮小 (サイズを拡大または縮小) できるようにしたいです。

\documentclass[11pt,twoside]{report}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, decorations.pathreplacing, matrix}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}

\addplot3[surf] {-x^2 - y^2};
\end{axis}
\end{tikzpicture}
\end{document}

答え1

その間、あなた自身で解決策を見つけられたことを願っています。そうでない場合は...

\documentclass[border=2pt]{standalone}
\usepackage{pgfplots}
\begin{document}
    \begin{tikzpicture}
        \begin{axis}[
            % change the width of the plot
            width=7cm,
            % change the `zmin' value
            % (0 makes no sense here, because that is the maximum value
            %  of the given function. That is why I have chosen -10 here.)
            zmin=-10,
        ]
            \addplot3 [surf] {-x^2 - y^2};
        \end{axis}
    \end{tikzpicture}
\end{document}

上記コードの結果を示す画像

関連情報