[Tex/LaTex] pst-circ: figure and caption overlapping

floatspstricks

I'm writing a thesis and need to get this problem solved.
I just started to use pst-circ as an alternative to cirtuitikz (seemed to me like it has better documentation), however I'm kinda stuck with the caption overlapping partially the circuit.

I don't know if I should use \vspace{something}, but I was looking for a cleaner solution (if possible). I'm not really sure I used the correct encapsulation. Maybe I should use a minipage as well.

enter image description here

I used the following code:

\begin{figure}[H]
\begin{center}
\begin{pspicture}[showgrid=false](9,8)
    \Cnode(0,0){P1} \psdot(P1) \nput[labelsep=0.25]{180}{P1}{R}
    \Cnode(9,0){P2} \psdot(P2) \nput[labelsep=0.25]{0}{P2}{S}   
    \pnode(4,0){C}

    \multidipole(P1)(C)
        \coil{$L$}      
        \capacitor{$C$}.

    \multidipole(P2)(C)
        \coil{$L$}      
        \capacitor{$C$}.
\end{pspicture}

    \caption{Filtre LC simple en configuration étoile}
    \label{filtre_lc_etoile_simple}
\end{center}
\end{figure}

(ignore the text inside the caption: it doesn't make any sense at all, since this is just a truncated copy-paste from another part of the document)

I'm not sure this is really a pst-circ problem: it may be a regular figure problem (though using external PNG / PDF files as source I never got this behaviour), maybe because dimensions where specified and known.

I encapsulated between a figure because I wanted to add some caption to it.

Any suggestions?

Best Answer

You can use the shift= option for pspicture to change the baseline (default is set at the bottom of the box):

\documentclass{article}
\usepackage{pst-circ}

\begin{document}

\begin{figure}[H]
\centering
\begin{pspicture}[shift=0.5](9,8)
    \Cnode(0,0){P1} \psdot(P1) \nput[labelsep=0.25]{180}{P1}{R}
    \Cnode(9,0){P2} \psdot(P2) \nput[labelsep=0.25]{0}{P2}{S}   
    \pnode(4,0){C}

    \multidipole(P1)(C)
        \coil{$L$}      
        \capacitor{$C$}.

    \multidipole(P2)(C)
        \coil{$L$}      
        \capacitor{$C$}.
\end{pspicture}

    \caption{Filtre LC simple en configuration étoile}
    \label{filtre_lc_etoile_simple}
\end{figure}

\end{document}

enter image description here

On a side note, I used \centering instead of the center environment to avoid adding extra undesired vertical spacing.

Related Question