\documentclass{article}
\usepackage{com.braju.graphicalmodels}
% \special{papersize=40mm,80mm}
% \setlength{\pdfpagewidth}{40mm}
% \setlength{\pdfpageheight}{80mm}
% \usepackage[vcentering,dvips]{geometry}
% \geometry{papersize={80mm,120mm},total={80mm,120mm},margin=0mm}



\catcode`\@=11%

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\LARGE
\psset{unit=10mm,arrowscale=1.5,linewidth=1.5pt}

\begin{pspicture}(0,0)(4,8)%\showgrid
  \SpecialCoor

  \rput(3,7){\GM@node[observed=false]{thetaZ}} \GM@label[angle=-180]{thetaZ}{$\theta_z$}

  \rput(1,2){\GM@plate{4}{4}{N}}

  \rput(3,5){\GM@node[observed=false]{zi}} \GM@label[angle=-180]{zi}{$z_i$}
  \rput(3,3){\GM@node[observed=true]{xi}} \GM@label[angle=-180]{xi}{$x_i$}

  \rput(3,1){\GM@node[observed=false]{thetaX}} \GM@label[angle=-180]{thetaX}{$\theta_x$}


  \ncline[arrows=->]{thetaZ}{zi}

  \ncline[arrows=->]{zi}{xi}

  \ncline[arrows=->]{thetaX}{xi}
\end{pspicture}

\endTeXtoEPS
\end{document}
