# Adjust spacing between specific rows with \xymatrix

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:

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.

-

## 1 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}


-
Perfect, thanks! – Adeel Jul 6 '12 at 17:04
I thought that it was necessary to use & even in empty rows. You didn't use! – Sigur Jul 7 '12 at 2:26