如何将下图放入幻灯片中?

如何将下图放入幻灯片中?

\documentclass[8pts]{beamer} 
\usepackage{amsmath,amsrefs}
\usepackage{amssymb}
\usepackage{graphics,graphicx}
\usetheme{Frankfurt}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usepackage{tkz-berge}
\usepackage{pgf, tikz}
%\usepackage{etex}
\usepackage{ragged2e}
\setbeamerfont{description}{size=\small}
\renewcommand{\baselinestretch}{1.4}
\def\B(G){\mathcal{T}_{\mathcal{B}_G}}
\usetikzlibrary{arrows, automata}
\usetikzlibrary{decorations.markings}
\usetheme{Warsaw}
%\usecolortheme{default}
\useoutertheme{miniframes}
%\usefonttheme{serif}
\usefonttheme{professionalfonts}
%\mathcolor{blue}
\mode<presentation>
\begin{document}


\begin{frame}\begin{block}{Contd.}\begin{footnotesize}
We use the notation \textcolor{red}{$\mathcal{P}(k,s,t)$} to denote the tree on $k+1$ vertices obtained from the path 
$P:=[x_0,x_{1}\ldots,x_{k-s-t}]$ on $k-s-t+1$ vertices by adding $s$ pendant vertices adjacent to 
the vertex $x_0$ and $t$ pendant vertices adjacent to the vertex $x_{k-s-t}$ of $P$. 

%\begin{frame}\begin{block}{Contd.}\begin{footnotesize}
%\begin{figure}[hbt!]
\begin{center}

\hspace{-4.5cm}  
\begin{figure}[ht]
\rput(5.7,0.25){
\psline(0,1)(2,1)
\psline[linestyle=dashed](2,1)(3,1)
\psline(3,1)(4,1)
\psdot(0,1)
\psdot(1,1)
\psdot(2,1)
\psdot(3,1)
\psdot(4,1)
\pscurve[linestyle=dotted](5.3,1.59)(5.45,1.3)(5.4,1.04)
\pscurve[linestyle=dotted](5.3,.45)(5.45,.71)(5.4,.98)
\psline(4,1)(5,0)
\psline(4,1)(5,2)
\psline(5.4,1)(4,1)
\psline(-1,2)(0,1)(-1,0)
\psdot(-1,2)
\psdot(-1,0)
\psdot(5.4,1)
\psline(5.3,.4)(4,1)(5.3,1.6)
\psline(-1.3,1.5)(0,1)(-1.3,.5)
\psdot(-1.3,1.5)
\psdot(-1.3,.5)
\pscurve[linestyle=dotted](-1.1,2)(-1.5,1)(-1.1,0)
\psdot(5.3,1.6)
\psdot(5.3,.4)
\psdot(5,0)
\psdot(5,2)
\rput(0.1,.8){$x_0$}
\rput(1,.8){$x_1$}
\rput(2,.8){$x_2$}
\rput(3.8,.8){$x_{k-s-t}$}
\rput[l](-3.5,1){$s$ vertices $\Bigg\{$}
\rput[l](5.6,1){$\Bigg\} t$ vertices}
}

\caption{The graph $\mathcal{P}(k,s,t)$}\label{pkst}

\end{figure}

\end{center}
\end{footnotesize}
\end{block}
\end{frame}
\end{document}

In this slide I am trying to put the figure in side the slide. But it goes outside. How can we do that?

相关内容