I would like to include a caption below a tree drawn using pspictures. Here is my code.
\documentclass[12pt]{article}
\usepackage{pst-pdgr,pstricks,pst-pdf,graphicx}
\usepackage[top=2cm, left=2cm, bottom=2cm,right=2cm]{geometry}
\usepackage{caption}
\begin{document}
Blah blah.
\begin{figure}
\begin{pspicture}(7,7)
%\psgrid
\psset{descarmA=1.2}
\rput(2.5,4.5){\pstPerson[male]{A}}
\rput(4.5,4.5){\pstPerson[female]{B}}
\rput(2.5,2.5){\pstPerson[male, affected, belowtext={\small A1}]{C}}
\rput(4.5,2.5){\pstPerson[female]{D}}
\pstRelationship[descentnode=AB]{A}{B}
\pstDescent{AB}{C}
\pstDescent{AB}{D}
\end{pspicture}
\caption{figure}{figure text}
\end{figure}
More blah.
\end{document}
Tree looks fine, however, caption is missing. There is no error message so I do not really have a clue as to what I am missing here. Thank you.
\caption{figure text}
would be enough. the caption package is needed for captions outside of float environments. Not inside them. – koleygr Oct 2 '17 at 19:53