如何在原地垂直翻转图形?

如何在原地垂直翻转图形?

我在 Windows 7 上使用 MiKTeX。

我正在尝试垂直翻转多 EPS 图形的组成部分。我使用的方法是 \scalebox,如下所示。

\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}

我的问题是,它会翻转图形底部。我希望它翻转图形中间,这样就不会出现净平移。我该怎么做?

答案1

这个怎么样?

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

翻动

答案2

我们想将其tikz用于一切事物 ;-)

\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}

在此处输入图片描述

相关内容