我怎样才能防止图表被“切断”?

我怎样才能防止图表被“切断”?

我不知道如何防止图表的顶部被截断。 在此处输入图片描述

这是我的代码:

\documentclass{article}
\usepackage{pst-plot}
\usepackage{pgfplots}
\usepackage{graphicx} 
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{gensymb}


\begin{document}

*$(\frac{n}{2})!=\Gamma(\frac{n}{2}+1)$
\begin{tikzpicture}
  \begin{axis}[axis lines=middle,xtick={-4,...,10},ytick={-4,...,6}]
    \addplot[domain=-4.1:10.1,red,samples=100] gnuplot {3.14^(x/2)/(gamma(x/2+1))} ;
    \node at (axis cs:-2.5,1) {$\frac{\pi^{\frac{x}{2}}}{\Gamma(\frac{x}{2}+1)}$};
              \node at (axis cs:1.8,2) {$(1,2)$};
              \draw [fill=black,draw opacity=1] (1,2) circle[radius= 0.2 em];  
              \node at (axis cs:2.8,3.14){$(2,\pi)$};
              \draw [fill=black,draw opacity=1] (2,3.14) circle[radius= 0.2 em];  
              \node at (axis cs:4,4.189){$(3,\frac{4\pi}{3})$};
              \draw [fill=black,draw opacity=1] (3,4.189) circle[radius= 0.2 em]; 
              \node at (axis cs:3,4.930){$(4,\frac{\pi^2}{2})$};
              \draw [fill=black,draw opacity=1] (4,4.930) circle[radius= 0.2 em]; 
              \node at (axis cs:5.2,4.9){$(5,\frac{8\pi^2}{15})$};
              \draw [fill=black,draw opacity=1] (5,5.264) circle[radius= 0.2 em]; 
              \node at (axis cs:7.2,5.168){$(6,\frac{\pi^3}{6})$};
              \draw [fill=black,draw opacity=1] (6,5.168) circle[radius= 0.2 em];      
              \node at (axis cs:8.4,4.725){$(7,\frac{16\pi^3}{105})$};
              \draw [fill=black,draw opacity=1] (7,4.725) circle[radius= 0.2 em]; 
              \node at (axis cs:9.2,4.059){$(8,\frac{\pi^4}{24})$};
              \draw [fill=black,draw opacity=1] (8,4.059) circle[radius= 0.2 em]; 
  \end{axis}
\end{tikzpicture}


相关内容