Question
Asked 19th Mar, 2014

How do i increase a figure's width/height only in latex?

Increasing a figure's width/height only in latex.

Most recent answer

20th Nov, 2022
Mohamed Elgbaily
Cardiff University
This is the appropriate answer to your concerns. All the best
\begin{figure}[H]
\centering
\includegraphics[width=1.0\linewidth,height=1\textheight]{Figure.png}
\caption{figure name.\label{fig:Figure}}
\end{figure}
\unskip

Popular answers (1)

19th Mar, 2014
Dr Qaim Mehdi Rizvi
Qassim University
Try to do this first:
Use the scale=1.5 option in the \includegraphics command to resize the image to 150% of its original size. That is, \includegraphics[width=50mm,scale=1.5]{method.eps}. You can use a different percentage if needed.
14 Recommendations

All Answers (38)

19th Mar, 2014
Dr Qaim Mehdi Rizvi
Qassim University
Try to do this first:
Use the scale=1.5 option in the \includegraphics command to resize the image to 150% of its original size. That is, \includegraphics[width=50mm,scale=1.5]{method.eps}. You can use a different percentage if needed.
14 Recommendations
19th Mar, 2014
Sabino Maggi
Italian National Research Council
You can set the width or height of the figure and let LaTeX scale the other dimension accordingly:
\includegraphics[width=150mm]{figure.pdf}
In some cases, if can be useful to rescale the figure with respect to the width (or the height) of the text:
\includegraphics[width=\textwidth]{figure.pdf}
(\includegraphics[width=\textheight]{figure.pdf})
You can even crop an image within LaTeX (without using an external graphical editor), with the trim/clip options:
\includegraphics[trim = <left>mm <bottom>mm <right>mm <top>mm, clip, width=150mm]{figure.pdf}
where <left>, <bottom>, <right> and <top> are the sizes of the borders to be trimmed.
3 Recommendations
19th Mar, 2014
Marcos Bujosa
Complutense University of Madrid
The graphicx package features the command \resizebox{width}{height}{object}
For example, you can try:
\resizebox{.8\textwidth}{!}{\includegraphics{Figure.pdf}}
or
\resizebox{8cm}{!} {\includegraphics{Figure.pdf}}
1 Recommendation
19th Mar, 2014
Pedro Antonio Barrientos Loayza
National University of Cordoba, Argentina
I suggest you do the following:
1 -. In the document preamble tex insert \ usepackage {graphicx}
2 - Insert also:
\ newcommand {\ imgdir} {includes}
\ graphicspath {{\ imgdir /}}
3 - In your project folder create a new folder called 'includes'
4 - You can now insert your image (which is in the includes folder) with the following code:
\ begin {center}
    \ includegraphics [scale = 0.3] {myFigure.png} \ \
\ end {center}
5 - The scale can be modified to your needs.
1 Recommendation
21st Mar, 2014
Dídac Busquets
Immense Simulations Ltd
If I've correctly understood Muhammad's question, he wants to change either the width or the height only, without keeping the aspect ratio.
I think that with all the previous answers (expect Lanouar's) the aspect ratio is preserved. However, in Lanouar's answer, you need to provide both the desired width and height. If you only want to indicate one while keeping the other as in the original image you can do the following (e.g. to change the image to be 1cm wide and keep the original height):
\newlength\mylen
\settoheight\mylen{\includegraphics{myImage}}
\resizebox{1cm}{\mylen}{\includegraphics{myImage}}
To change the height to be 1cm and keep the width you would do:
\newlength\mylen
\settowidth\mylen{\includegraphics{myImage}}
\resizebox{\mylen}{1cm}{\includegraphics{myImage}}
Hope it helps.
3 Recommendations
26th Mar, 2014
Mohd. Imran
Jamia Millia Islamia
To control over figure's width/height even position in latex, you can use the following template:
\begin{figure}[!htb]
\centering
\includegraphics[width=**cm,height=**cm,angle=0]{filename}
\caption{put caption here.
\label{fig:filename1}}
\end{figure}
2 Recommendations
12th May, 2014
Benjamin Leduc
University of Iceland
Usually, I use
\includegraphics[width=**cm]{filename}
every ratio is then respected…
But if doing some graphics… just keep the same size than original else it isn't well-focused
3rd Feb, 2015
Bruno Lopes
Universidade Federal Fluminense
If you plan to reuse the LaaTeX code it is a good idea to use something like \includegraphics[width=0.5\textwidth]{figureFile}. In this code the picture will be adjusted to the width of half of text horizontal space.
1 Recommendation
15th Nov, 2018
Enas Shehata
Menoufia University
\begin{figure}[h!]
\centering
\includegraphics[width=4in,height=3in]{file name.eps}
\caption{} \label{}
\end{figure}
3 Recommendations
25th Feb, 2019
Anil Kumar
London Metropolitan University
\begin{wrapfigure}
\vspace{-5cm}
%\begin{center}
\includegraphics[height=3.5cm, width=3cm, right]{1.jpg}
%\end{center}
\vspace{-5cm}
\end{wrapfigure}
please use it
25th Apr, 2019
Zaheer Alam
COMSATS University Islamabad
It will place your figure according to your desire.
\begin{figure}[H]
\centerline{
\includegraphics[width=12cm]{jpeg}}
\caption{}
\label{fig:?}
\end{figure}
25th Apr, 2019
Anil Kumar
London Metropolitan University
Please search in google. As per my experience when you face any problem related to LeTeX just in google only. It will take time, give you confidence and more learning about LeTeX .
2 Recommendations
4th Jun, 2019
John T Mendy
University of Gambia
Exactly, i always go to google whenever i have to either install a package or other things. You know what, is the best way and fast to learn latex
16th Jun, 2019
Ashis Talukder
University of Dhaka
\begin{figure*}[t]
\centering
\begin{tabular}[b]{c}
\includegraphics[width=.3\textwidth, keepaspectratio,angle=0]{u/cmh_fc.pdf} \\
\small \textcolor{accessblue}{(a)} Facebook dataset
\end{tabular}
\begin{tabular}[b]{c}
\includegraphics[width=.3\textwidth, keepaspectratio]{u/cmh_shc.pdf} \\
\small \textcolor{accessblue}{(b)} Slashdot dataset
\end{tabular}
\begin{tabular}[b]{c}
\includegraphics[width=.3\textwidth, keepaspectratio]{u/cmh_wc.pdf} \\
\small \textcolor{accessblue}{(c)} Wiki-Vote dataset
\end{tabular}
\caption{\textbf{The seeding cost (in hundred) for different values of $k$ for a) Facebook, b) Slashdot, c) Wiki-Vote, d) Twitter, e) Random1, f) Random2 dataset.}}
\label{fig:cost}
%\vspace{-2.5em}
\end{figure*}
--- "figure*" will take whole to column
--- "figure" will limit the figure span in single column
--- [width=0.3\textwidth, keepaspectratio,angle=0] this will control the size of the figure, change the fraction to your desired one. say 0.25\textwidth, if do not wanna keep the aspect ration same, use "height = 0.5 cm" like setting. you can change the angular position as well.
Happy research!
~AT
2 Recommendations
25th Feb, 2020
Israr Bacha
Northwestern Polytechnical University
Can anyone give me the code snippet for figure size in IEEE format regardless of original size ?or how to balance between original size and size in latex?
27th Feb, 2020
Anton Vrdoljak
University of Mostar
To Israr Bacha : I recommend to ask this Q at TeX - LaTeX Stack Exchange (Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems):
2 Recommendations
28th Feb, 2020
Israr Bacha
Northwestern Polytechnical University
Thanks
you can pass width and height as arguments to \includegraphics command, like this for example :
\includegraphics[width=3cm, height=4cm]{"name of the image file"}
or you can just change the whole scale by using this :
\includegraphics[scale=0.75]{"name of the image file"}
3rd Apr, 2020
Yılmaz Erdem
Aydın Adnan Menderes University
\begin{figure}[hbt!]
\centering
\includegraphics[width=0.8\linewidth]{ "name of the image file" } %other settings %[width=10.5cm, height=7.cm] %[scale=0.5]
\caption{type about picture}
\end{figure}
2 Recommendations
14th Apr, 2020
Muhammad Waseem
Gift University
\includegraphics[width=\textwidth]{figure.png} you may aslo change height and width as well
\includegraphics[width=5cm, height=5cm]{figures/plots/F17.png}
1 Recommendation
22nd Apr, 2020
El Malki Mohamed
Laboratory of Materials, Waves, Energy and Environment
The operation of changing the size of the image in LaTeX can be achieved using the command
\includegraphics[width=Xcm, height=Ycm]{name of the file. type of the file}
Where X and Y are argements representing the dimention of the width and the height of your picture.
Before using this command you need to insert the package [graphicx.sty} in the list of packages
1 Recommendation
17th May, 2020
El Malki Mohamed
Laboratory of Materials, Waves, Energy and Environment
notice that, the changing of size has no relationship with the the quality of figure it self. Thats why your figure need to bee with good resolution before insert it in using Latex
19th Jul, 2020
Duha Shubair
Hi,
I have an image that has the width =1.1 and I need to minimize 3 cm from each side. How can I calculate it?
1 Recommendation
9th Aug, 2020
Dinesh RAMKRUSHNA Rotake
Indian Institute of Technology Hyderabad
see the following example for answer:
\begin{figure}[h!]
\centering
\includegraphics[width=14cm,height=13.5cm]{imagenew/Biosensor_process_flow_SECOND.eps}
\caption{Process flow of biosensor for selective mercury ions detection}
\label{Process flow of biosensor for HMIs detection_thin}
\end{figure}\\
By simply changing [width=3cm,height=3cm]
2 Recommendations
19th Aug, 2020
Ravi Kumar
Institute of Aeronautical Engineering
@ Israr Bacha
\begin{figure}[h]
\centering
\includegraphics[width=1.0\linewidth,height=0.5\textheight]{}
\caption{}
\label{}
\end{figure}
4 Recommendations
27th Jul, 2021
Bayan Alsaaidah
Al-Balqa Applied University
You can use number or ratio or both like this:
\begin{figure}[h]
\includegraphics[width=1.0\textwidth,height=140]{I'm.png}
\caption{ ..... }
\centering
\end{figure}\\
2 Recommendations
8th Nov, 2021
Vivek Prakash
Banasthali University
Hi,
You can adjust the figure in latex using following command:
\begin{figure}
\centering
\includegraphics[width=.. cm, height= .. cm, scale=..]{Fig.png}
\caption{.....}
\label{FIG:1}
\end{figure}
2 Recommendations
20th Jan, 2022
Waqar Khan
Yan Shan University
20th Nov, 2022
Mohamed Elgbaily
Cardiff University
This is the appropriate answer to your concerns. All the best
\begin{figure}[H]
\centering
\includegraphics[width=1.0\linewidth,height=1\textheight]{Figure.png}
\caption{figure name.\label{fig:Figure}}
\end{figure}
\unskip

Similar questions and discussions

Related Publications

Article
Erzeugen von Dokumenten aus TeX/LaTeX, die für den Offsetdruck in einer Druckerei vorbereitet sind. - Kosten - Voraussetzungen an das Dokument - Schnittmarken - Farbseparation - Testmöglichkeiten
Article
Tulisan ini akan memaparkan penggunaan TeX/LaTeX sebagai alternatif dalam penulisan jurnal ComTech dengan menjelaskan instruksi-instruksi LaTeX yang digunakan untuk mengatur tampilan judul tulisan sampai dengan tubuh tulisan sesuai dengan spesifikasi yang telah ditetapkan jurnal ComTech. Hasil dari kompilasi tersebut mendekati susunan format yang t...
Book
A computer science topics course based on algorithms underlying TeX and LaTeX.
Got a technical question?
Get high-quality answers from experts.