# I want to create graph with nodes as in the image:

I wrote an example graph with \xymatrix - that's OK. I added circles with &*+[Fo], that's OK too. I added table inside first circle with \begin{tabular} - it is OK. But table needs to be rotated by -45 degrees. When i use isorot package to rotate it, first - it rotates not against center, but against corner, and, more sadly, xymatrix then can't determine circle size, and it shrinks.

How can I rotate table in next example?

$$\xymatrix{&*+[Fo]{ \begin{tabular}{c|c} 2&3\\ \hline 4&5 \end{tabular} }\ar@{-}[r]\ar@{-}[dd]\ar@{-}[rrd]&*+[Fo]{3}\ar@{-}[lld]\ar@{-}[ldd]\ar@{-}[dd]\ar@{-}[rdd]\ar@{-}[rd]& \\ *+[Fo]{1}\ar@{-}[rrr] &&&*+[Fo]{4}\ar@{-}[ld] \\ &*+[Fo]{7}&*+[Fo]{6}\ar@{-}[l]&*+[Fo]{5}& }$$

-

Since you did not say that you are required to use xy-pic, even though you used it, here's a TikZ suggestion. I use TikZ for such diagrams since it's very capable and the readably syntax is a great benefit for making complex diagrams.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,positioning}

\newcommand*{\drawnode}[1]{
\draw (#1.45) -- (#1.225);
\draw (#1.135) -- (#1.315);
\node at ( $(#1) + (90:0.5cm)$ ) {1};
\node at ( $(#1) + (180:0.5cm)$ ) {2};
\node at ( $(#1) + (0:0.5cm)$ ) {3};
\node at ( $(#1) + (270:0.5cm)$ ) {4};
}
\begin{document}

\begin{tikzpicture}[shorten >=1pt, auto, node distance=2.5 cm, >=angle 60,
splittednode/.style={circle, draw, minimum size=1.5 cm},
every node/.append style={font=\sffamily}]

\node[splittednode] (A) {};
\node[splittednode, above right of =A,] (B) {};
\node[splittednode, below right of =A,] (C) {};

\foreach \Node in {A,B,C}
\drawnode{\Node};

\draw[->] (A) -- node{10} (B);
\draw[->] (A) -- node{20} (C);
\end{tikzpicture}

\end{document}


-
Well, i shall try it tomorrow. But one question - how can i draw an arror not DIRECT to right or up, or something. Say, i want to arrow up, then right, then right again, then down, and here i want to place node? And second question - can i make two arrows to same node? – user2031702 Feb 1 '13 at 9:14
@user2031702 You can post this as a new question. Comments are not the best place for discussing follow-up questions. This Q&A site works best with one question for each problem. – Stefan Kottwitz Feb 1 '13 at 9:17
OK, thanks for your answer. – user2031702 Feb 1 '13 at 9:23
Thanks, it worked. – user2031702 Feb 5 '13 at 9:04
@user2031702 Nice to read! So you use TikZ for this now? I would add the tikz-pgf tag after specifying in the question that TikZ would be an option, besides xy-pic. It would be great if you would mark the answer as accepted, by clicking the check mark at the left. – Stefan Kottwitz Feb 5 '13 at 9:08