Graphics, Figures & TablesSize of figures in subfigure environment

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Rhine Samajdar
Posts: 1
Joined: Thu Apr 03, 2014 12:14 am

Size of figures in subfigure environment

Post by Rhine Samajdar »

Hi,
I am fairly new to LaTex and am unfamiliar with the intricate details so kindly pardon me if my question is trivial. I was working with the elsarticle.cls class for my article and my code involved the subfloat environment to include three pictures. However, the scaling of the pictures is totally wrong and the figures simply appear huge. No matter what value I use in the scalebox argument, the figures are always blown out of proportion. Nevertheless, changing the class to simply article ensures the figures are properly scaled. My minimal working example is provided below. Is there some way to resize figures in the subfloat environment in the elsarticle.cls class? Any help in this regard would be greatly appreciated. Thank you!

Code: Select all

[MWE]\documentclass[preprint, 3p, number]{elsarticle}
\usepackage{latexsym}
\usepackage[dvips]{color}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{amssymb}

\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{float}
\usepackage{parskip}
\usepackage{textcomp}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage{subfig}
\usepackage{array}
\usepackage{longtable}
\usepackage[colorlinks=true]{hyperref}
\newtheorem{theorem}{Theorem}
\newproof{pf}{\bf{Proof}}
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\setlength{\tabcolsep}{-15pt}
\setlength{\textfloatsep}{0cm}
\pagestyle{plain}

\begin{document}
\begin{frontmatter}
\begin{abstract}
\end{abstract}
\end{frontmatter}

\setlength{\tabcolsep}{8pt}
\renewcommand{\arraystretch}{2.5}
\section{Introduction}
\noindent
\begin{figure} [H]\scriptsize
\begin{center}
\subfloat[]{\scalebox{0.3}{\includegraphics{Rectangle1.pdf}}}
\qquad \qquad
\subfloat[]{\scalebox{0.3}{\includegraphics{Rectangle2.pdf}}}
\qquad \qquad
\subfloat[]{\includegraphics[scale = 0.01, trim = 7cm 10.3cm 7cm 15cm]{Rectangle3.pdf}}
\end{center}
\caption{These are my triangles}
\label{examples}
\end{figure}

\end{document}
[/MWE]

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply