[Xy-pic] Problem with Xy-pic graph next to eps file via subfigure package

Richard Dybowski rdybowski at btinternet.com
Fri May 16 11:03:45 CEST 2003


You are a genius; I tried \begin{xy} *!D\xybox{\xymatrix{....}}\end{xy} and 
it worked!

Many thanks,


> > I would like to place a graph produced by Xy-pic next to a figure obtained
> > from an EPS file. I have attempted this using the subfigure package but,
> > instead of the two figures appearing side-by-side, the figure from Xy-pic
> > appears much lower than that from the EPS file. How do I overcome this
> > problem?
>It sounds like you are placing two boxes side-by-side, in horizontal mode.
>where those boxes have different heights and depths.
>TeX will align them so that the baselines match.
>By default, Xy-pic produces boxes in which the baseline is midway down
>the diagram; i.e. equal height and depth.
>But you can easily change this, using \xybox .
>e.g.  \begin{xy} *!D\xybox{.....}\end{xy}
>places the contents (Xy-pic constructed sub-diagram)
>as a single <object> within the outer {xy}-environment.
>The !D moifier means that the current reference point is at the
>bottom (Down) edge, hence all of the diagram is above this.
>That is, the resulting box has all height, no depth.
>In your case, you may want:
>  \begin{xy} *!D\xybox{\xymatrix{....}}\end{xy}
>Using different modifiers, (e.g. factors after the direction
>specifier) you can shift the diagram vertically, as much as you like;
>e.g., try the effect of:
>  \begin{xy} *!U(.5)\xybox{\xymatrix{....}}\end{xy}
>  \begin{xy} *!D(1.2)\xybox{\xymatrix{....}}\end{xy}
>Hope this helps.
>         Ross Moore

Dr Richard Dybowski
143 Village Way
Pinner HA5 5AA, UK
Tel: 07976 250092

More information about the Xy-pic mailing list