Responsive Navbar with Google Search
☰ Menu
Home
Python
LaTeX
GNUPlot
Arduino
Feedback
Contact Us
Figures: Inserting Figures
Figures
Inserting Figures
Figure Alignment
Figure Captions
Inserting Figures: Program 1
\documentclass{article} \usepackage{graphicx} \begin{document} \section{Force on an Object} According to Newton's Second Law, the force on an object is given by: \begin{equation} F = ma \end{equation} where $m$ is the mass of the object and $a$ is its acceleration. \begin{figure}[h] \centering \includegraphics[width=0.4\textwidth]{https://python4physics.in/program/latex/fig1.png} \label{fig:force} \end{figure} \end{document}
Run Code
Output 1
Inserting Figures: Program 2
\documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \begin{document} \section{Newton's Laws of Motion} Newton's First Law states that an object will remain at rest or in uniform motion unless acted upon by a force. Newton's Second Law gives the relationship between force, mass, and acceleration: \begin{equation} F = ma \end{equation} \begin{figure}[h] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[width=\linewidth]{fig2.png} \end{subfigure}\hfill \begin{subfigure}{0.45\textwidth} \includegraphics[width=\linewidth]{fig3.png} \end{subfigure} \end{figure} \end{document}
Run Code
Output 2