# Problem drawing diagram with XY-Pic

How I can draw the following diagram with XY-Pic :

-
Do you explicitly need to do it with XY-Pic or may be the package tikz-cd may fit your needs? By the way, could you show what is your real problem? What is your actual code? What did you try so far? –  Manuel Apr 29 '14 at 17:29
@Manuel, I want to do with Pic-xy, because I'm not familiar with tikz-cd. –  Med Apr 29 '14 at 17:37
As you see in Gonzalo's answer, it's quite easy to learn ;) –  Manuel Apr 29 '14 at 17:43

If the powerful and more modern tikz-cd package is an option (the syntax is similar to that of xy):

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
Z\ar[dashed]{rr}\ar{drrr}\ar{dr} & & X\times_{S} Y\ar{dl}\ar{dr} \\
& X\ar{dr} & & Y\ar{dl} \\
& & S
\end{tikzcd}

\end{document}


-
Thank you so much. –  Med Apr 29 '14 at 17:49

This is simple

\documentclass{article}
\usepackage[all]{xy}

\begin{document}

$\xymatrix{ Z\ar[rd]\ar[rrrd]\ar@{-->}[rr] & & X\times_S Y\ar[ld]\ar[rd] & \\ & X\ar[rd] & & Y\ar[ld]\\ & & S & }$

\end{document}

-
Thank you so much. –  Med Apr 29 '14 at 17:58