The following TeX code produces the commutative diagrams below:

\documentclass{article}
\usepackage[all]{xy}
\begin{document}
\xymatrix{B\ar@{.>}[d]_g\ar[dr]^{1_B}&&\\
 A\ar[r]^(.45)f&B\ar[r]^{\pi}&0}
\bigskip
\xymatrix{B\ar@{.>}[d]_g\ar[dr]^{1_B}&&\\
 A\ar[r]^(.45)f\ar@/_.8pc/[rr]_{\pi f}&B\ar[r]^{\pi}&0}

\end{document}

\xymatrix{B \ar@{.>}[d]_{g} \ar[dr]^{1_{B}} \\ A \ar[r]^{f} & B \ar[r]^{π} & 0}

\xymatrix{B \ar@{.>}[d]_{g} \ar[dr]^{1_{B}} \\ A \ar[r]^{f} \ar[rr]_{πf} & B \ar[r]^{π} & 0}