23

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?

6
  • 1
    How about \rotatebox{<angle>}{<content>}? – azetina Dec 2 '13 at 22:33
  • 1
    Does \rotatebox flip or just rotate? Thanks. – OtagoHarbour Dec 2 '13 at 22:37
  • Well I suppose if you rotate it will eventually simulate a flip, right? – azetina Dec 2 '13 at 22:38
  • 1
    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. – OtagoHarbour Dec 2 '13 at 22:40
  • 2
    True true. I take it back. Possibly a combination of \reflectbox{<content>} and \rotatebox – azetina Dec 2 '13 at 23:04
22

How about this?

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

flip

9

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}

enter image description here

4
  • Are you waiting for the omnipotent PSTricks solution? :-) – kiss my armpit 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. – azetina Dec 4 '13 at 0:04
  • Here is one at tex.stackexchange.com/a/312887/18678 – Khaaba Jun 3 '16 at 14:59

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.