# How do you vertically flip a figure in place?

I am using MiKTeX on Windows 7.

I am trying to vertically flip a figure that is a component of a multi-EPS figure. The method I use is \scalebox as follows.

\documentclass{article}      % Specifies the document class
\usepackage{geometry}
\usepackage{setspace}
\usepackage[dvips]{graphicx}
\usepackage{afterpage}
\usepackage{amssymb}
\usepackage{sistyle}
\usepackage{rotate}

\newcommand{\ip}[2]{(#1, #2)}
% Defines \ip{arg1}{arg2} to mean
% (arg1, arg2).

\input{psfig}

\renewcommand\floatpagefraction{0.8}%

\setlength{\textwidth}{7.0in}
\setlength{\oddsidemargin}{-.25in}
\setlength{\evensidemargin}{-.25in}
\setlength{\topmargin}{-0.25in}
\setlength{\textheight}{9.0in}
\parskip 6pt

\begin{document}

\begin{figure}[p]
\centerline{
\scalebox{1}[-1]{\includegraphics[width=2.5in]{c:/Users/Peter/Clustering/OriginalObjects2.eps}}
\includegraphics[angle=90,width=2.5in]{c:/Users/Peter/Clustering/Samples/OriginalGravFieldHist.eps}}
\vspace{0.1in}
\centerline{(a) \hspace{3.5in} (b)}
\vspace{0.2in}
\centerline{\includegraphics[angle=90,width=2.5in]{c:/Users/Peter/Clustering/Samples/OriginalGravFieldHistDiff.eps}
\includegraphics[width=2.5in]{c:/Users/Peter/Clustering/OriginalObjectsFiltSquared.eps}}
\vspace{0.1in}
\centerline{(c) \hspace{3.5in} (d)}
\vspace{0.2in}
\centerline{\includegraphics[width=2.5in]{c:/Users/Peter/Clustering/OriginalObjectsFiltCubed.eps}}
\vspace{0.1in}
\centerline{(e)}

\caption{whatever}
\label{whatever}
\end{figure}

\end{document}


My problem is that it flips the figure around the bottom of the figure. I would like it to flip around the middle of the figure so that there is no net translation. How do I do that?

• How about \rotatebox{<angle>}{<content>}? Dec 2 '13 at 22:33
• Does \rotatebox flip or just rotate? Thanks. Dec 2 '13 at 22:37
• Well I suppose if you rotate it will eventually simulate a flip, right? Dec 2 '13 at 22:38
• Not really. If you flip a clock face around the horizontal axis, the 9 would still be on the left and the 3 on the right. If you rotate it by 180 degrees, the 3 will be on the left and the 9 on the right. The "angle=" effects rotation. It's like turning a transparency over. No amount of rotation will have the same effect. Dec 2 '13 at 22:40
• True true. I take it back. Possibly a combination of \reflectbox{<content>} and \rotatebox Dec 2 '13 at 23:04

\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}
ABC \reflectbox{\rotatebox[origin=c]{180}{ABC}}
\end{document}


We want to use tikz for every thing ;-)

\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}
ABC \tikz[baseline=(a.north)]\node[yscale=-1,inner sep=0,outer sep=0](a){ABC};

\includegraphics[width=3cm]{example-image} \tikz[baseline=(a.north)]\node[yscale=-1,inner sep=0,outer sep=0](a){\includegraphics[width=3cm]{example-image}};
\end{document}


• Are you waiting for the omnipotent PSTricks solution? :-) Dec 3 '13 at 1:50
• @DonutE.Knot Why not? ;-)
– user11232
Dec 3 '13 at 2:20
• @DonutE.Knot Show us all. I love learning different ways. Dec 4 '13 at 0:04
• Here is one at tex.stackexchange.com/a/312887/18678 Jun 3 '16 at 14:59