I tried the following:
\documentclass{beamer}
\mode<presentation>
\usepackage []{graphicx}
\usepackage{caption}
\usepackage{amsmath, amstext}
\usepackage{amsmath}
\usepackage{float}
\usepackage{pst-all}
\begin{document}
\begin{figure}[h]\hspace*{2.4cm}
\begin{minipage}[t]{.45\textwidth}
\begin{pspicture}(4,4.3)
\rput(3.7,-0.2){\scalebox{1.2}{
\psdot(1.5,3.5)\rput(1.45,3.75){$v_1$}
\psdot(-1,2)\rput(-1.3,2){$v_2$}
\psdot(.5,2.3)\rput(0.9,2.3){$v_3$}
\psdot(3,1)\rput(3,0.7){$v_4$}
\psdot(4,2)\rput(4.3,2){$v_5$}
\psdot(1,0.5)\rput(1,0.2){$v_6$}
\psline(1.5,3.5)(-1,2)
\psline(1.5,3.5)(0.5,2.3)
\psline(1.5,3.5)(3,1)
\psline(1.5,3.5)(1,0.5)
\psline(-1,2)(.5,2.3)
\psline(-1,2)(1,0.5)
\psline(-1,2)(4,2)
\psline(3,1)(.5,2.3)
\psline(4,2)(3,1)
\psline(-1,2)(1,0.5)
}}
\end{pspicture}
\end{minipage}
\caption{The graph $G_1$}\label{Fig-1}
\end{figure}
\end{document}
I am trying to run, but error occurs. Please someone help me. Thank you
{}
symbol in the toolbar. Alternatively you can use Ctrl-k after selecting the code lines. See “How do I format my posts using Markdown or HTML?” for more information.latex
+dvips
+ps2pdf
to make the PDF usingpst-all
? See also: How to use PSTricks in pdfLaTeX?