[Tex/LaTex] Adjust spacing between specific rows with \xymatrix

diagramsxy-pic

I have the following diagram:

\[ \xymatrix @!=1pc {
  & Z \ar@{.>}[d]^{\exists!h} \ar@/_1.2pc/[ddl]_{p'} \ar@/^1.2pc/[ddr]^{q'} & \\
  & X \times_S Y \ar[dl]_p\ar[dr]^q & \\
X \ar[dr]_f & & Y \ar[dl]^g \\
  & S & 
} \]

which looks like this:

diagram

I want to decrease the spacing between the second and third rows. I know about @R=xpc, but that will decrease the spacing between the first and second rows as well.

Best Answer

You can emulate it by using fake rows:

\documentclass{article}
\usepackage[all,cmtip]{xy}
\begin{document}
\[
\xymatrix @C=1pc @R=.5pc{
  & Z \ar@{.>}[dd]^{\exists!h} \ar@/_.6pc/[dddl]_{p'} \ar@/^.6pc/[dddr]^{q'} & \\
  \\
  & X \times_S Y \ar[dl]_-p\ar[dr]^-q & \\
X \ar[ddr]_f & & Y \ar[ddl]^g \\
  \\
  & S &
}
\]
\end{document}

enter image description here