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

Richard Dybowski rdybowski at btinternet.com
Thu May 15 21:03:06 CEST 2003


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?

The complete LaTeX code is as follows:

%--------------------------------------------------
\documentclass{article}

\usepackage{graphicx,subfigure}
\usepackage[all,frame,curve,rotate]{xy}

\newcommand{\agraph}{
$$\xymatrix{
  & X_1 \ar[dl]\ar[dr] & \\
  X_2 \ar[dr] & & X_3 \ar[dl] \\
  & X_4 &
}$$}

\begin{document}

\begin{figure}[htb]
\centering \mbox{
  \subfigure[]{\agraph}
  \subfigure[]{\includegraphics[width=0.4\textwidth]{afigure.eps}} }
  \caption{A caption} \label{fig:1}
\end{figure}

\end{document}
%--------------------------------------------------

Thanking you in advance,

Richard

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



More information about the Xy-pic mailing list