1

I'm trying to put an eps figure in the ACM template but the figure does not appear (it works fine with png figure, though). When I change

.8\linewidth to .4\linewidth

the figure appears but that's too small.

\documentclass[sigconf]{acmart}

%
% defining the \BibTeX command - from Oren Patashnik's original BibTeX documentation.
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08emT\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

% Rights management information. 
% This information is sent to you when you complete the rights form.
% These commands have SAMPLE values in them; it is your responsibility as an author to replace
% the commands and values with those provided to you when you complete the rights form.
%
% These commands are for a PROCEEDINGS abstract or paper.
\copyrightyear{2019}
\acmYear{2019}
\setcopyright{acmlicensed}
\acmConference[CPS-SR '19]{CPS-SR '19: Cyber-Physical Systems and Internet-of-Things Week}{April 15--19, 2019}{Montreal, Canada}
\acmBooktitle{CPS-SR '19: 2$^\text{nd}$ Workshop on Cyber-Physical Systems Security and Resilience, April 15--19, 2019, Montreal, Canada}
\acmPrice{15.00}
\acmDOI{10.1145/1122445.1122456}
\acmISBN{978-1-4503-9999-9/18/06}

\usepackage{amsmath, amsfonts, amssymb, color, enumerate, amsthm, graphicx}
\usepackage{tikz, subcaption}
\usepackage{color, xcolor, soul, bm}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\hypersetup{
    colorlinks   = true, %Colours links instead of ugly boxes
    urlcolor     = blue, %Colour for external hyperlinks
    linkcolor    = blue, %Colour of internal links
    citecolor   = green %Colour of citations
}
\usepackage[normalem]{ulem}
\newtheorem{problem}{Problem}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}
\newtheorem{assumption}{Assumption}
\newtheorem{proposition}{Proposition}
\newtheorem{lemma}{Lemma}
\newtheorem{remark}{Remark}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\usepackage{epsfig} 
\usepackage{psfrag}
\DeclareMathOperator{\diag}{diag}
\usepackage{tcolorbox}
\newcommand{\JW}[1]{{\color{red}#1}}
\include{user_newcommands}

\usepackage{algorithm}
\usepackage{algpseudocode}
\allowdisplaybreaks

%\newcommand{\ShS}[1]{$\clubsuit$\footnote{SHREYAS: #1}}
%\newcommand{\mathcolorbox}[2]{\colorbox{#1}{$\displaystyle #2$}}

%\def\endtheorem{\hspace*{\fill}~\IEEEQEDopen\par\endtrivlist\unskip}
%\def\endlemma{\hspace*{\fill}~\IEEEQEDopen\par\endtrivlist\unskip}
%\def\endproposition{\hspace*{\fill}~\IEEEQEDopen\par\endtrivlist\unskip}
%\def\endexample{\hspace*{\fill}~\IEEEQEDopen\par\endtrivlist\unskip}
%\def\endremark{\hspace*{\fill}~\IEEEQEDopen\par\endtrivlist\unskip}
%\def\enddefinition{\hspace*{\fill}~\IEEEQEDopen\par\endtrivlist\unskip}

%
% These commands are for a JOURNAL article.
%\setcopyright{acmcopyright}
%\acmJournal{TOG}
%\acmYear{2018}\acmVolume{37}\acmNumber{4}\acmArticle{111}\acmMonth{8}
%\acmDOI{10.1145/1122445.1122456}

%
% Submission ID. 
% Use this when submitting an article to a sponsored event. You'll receive a unique submission ID from the organizers
% of the event, and this ID should be used as the parameter to this command.
%\acmSubmissionID{123-A56-BU3}

%
% The majority of ACM publications use numbered citations and references. If you are preparing content for an event
% sponsored by ACM SIGGRAPH, you must use the "author year" style of citations and references. Uncommenting
% the next command will enable that style.
%\citestyle{acmauthoryear}

%
% end of the preamble, start of the body of the document source.
\begin{document}
\begin{figure}[t]
    \vspace{-.21cm}
    \centering
    \begin{subfigure}{.8\linewidth}
        \centering
        \includegraphics[width=\linewidth, height=\textheight, keepaspectratio]{images/undirected_f2_1.eps}
        \caption{General view}
        \label{fig: f2a}
    \end{subfigure}\\
    \begin{subfigure}{.8\linewidth}
        \centering
        \vspace{2mm}
        \includegraphics[width=\linewidth, height=\textheight, keepaspectratio]{images/undirected_f2_2.eps}
        \caption{Attacker view}
        \label{fig: f2b}
    \end{subfigure}\\
    \begin{subfigure}{.8\linewidth}
        \centering
        \vspace{2mm}
        \includegraphics[width=\linewidth, height=\textheight, keepaspectratio]{images/undirected_f2_3.eps}
        \caption{Detector view}
        \label{fig: f2c}
    \end{subfigure}
    \caption{Game values and NE for a weighted undirected platoon with 5 vehicles and $f = 2$}
    \label{fig: f2}
\end{figure}
\end{document}
1
  • 1
    if you say ` height=\textheight` then either it is not used (because the width is used instead) or if it is used in which case the image will be that tall, so the entire float inclusing the caption will be taller than the page and not fit anywhere. i would delete those key settings – David Carlisle Feb 5 '19 at 19:49
2

if you say height=\textheight then either it is not used (because the width is used instead) or if it is used in which case the image will be that tall, so the entire float including the caption will be taller than the page and not fit anywhere. I would delete those key settings

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.