0

I have two figures that I am trying to align side by side. The difficulty is trying to get the two plots on a same horizontal line. In the bad example picture shown belowenter image description here

the problem is that the picture to the right is put rather up. What I would like to do is to have the horizontal axes of both graphs at the same level so that for example the figure to the right is lowered down such that its horizontal axis is at the same level as that of the left figure.

I am putting my code here and all files are available on this link:

http://petitlien.fr/latexfiles

(Just click on the green guest file storage/guest access)

In my code I am keeping the size of the page as I need in my final document. Here is the code:

\documentclass[fleqn,a4paper,openany,twoside,11pt]{book}
\usepackage[top=5.5cm,left=45mm,right=45mm,bottom=5.5cm]{geometry}
\usepackage[latin1]{inputenx}
\usepackage[OT1]{fontenc}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[below]{placeins}
\usepackage{subfig}
\captionsetup[subfloat]{captionskip=15pt}
\usepackage{xcolor}
\usepackage{psfrag}
\newcommand{\figtext}{\small}


\begin{document}
\begin{figure}[htp]
\psfrag{A}{$\text{A}$}
\psfrag{B}{$\text{B}$}
\psfrag{C}{$\text{C}$}
\psfrag{D}{$\text{D}$}
\psfrag{E}{$\text{E}$}
\psfrag{F}{$\text{F}$}
\psfrag{G}{$\text{Alphabet letters}$}
\centering{\figtext
\subfloat[Money histories]{
     \input{moneypredicted.tex}
     \includegraphics[width=0.45\textwidth]{moneypredicted.eps}}
\hfill
\subfloat[Health indicator]{
     \includegraphics[width=0.45\textwidth]{alphabet.eps}}
\caption{Hi there}}
\end{figure}
\end{document}

Thanks for any suggestions.

2

While not particularly intended for your problem, you can use the \addvbuffer feature of the verbatimbox package to solve this. I demonstrate figures by way of \bxfigure, but the same applies in the figure environment. In your example, you would place the \addvbuffer around the \includegraphics command needing to be raised and set the value of \boxbottomsep to an appropriate value.

\documentclass{article}
\usepackage{verbatimbox}
\usepackage{boxhandler}
\begin{document}

\bxfigure{This is the caption}
{\rule{2in}{2in} \hfill \rule{2in}{1.5in}}

\boxbottomsep = 20pt
\boxtopsep = 0pt

\bxfigure{This is the caption}
{\rule{2in}{2in} \hfill \addvbuffer{\rule{2in}{1.5in}}}

\end{document}
  • @ Steven B. Segletes Thanks. This is a solution that works on my sample document. I hope that the verbatimbox package behaves well with the many other packages that I have in my actual document. 1 vote up for now. – yCalleecharan Apr 2 '13 at 10:50
  • If there is a problem, let me know. verbatimbox is very simple (I wrote it) and I should be able to adapt it to your need, if a conflict arises. – Steven B. Segletes Apr 2 '13 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.