I. Location of inserted pictures
Default method:
follow.tex
file has the same path, so just write the image name directly. \includegraphics[width=1\linewidth]{graph_rela.png}
Images in the current subfolder
is a relative path, write: folder name + image name \includegraphics[width=1\linewidth]{figures//graph_rela.png}
Pictures in other folders
Absolute paths can be used.\includegraphics{D:/matlab/image/}
II. Import section of the picture
\usepackage{subfigure}
\usepackage[graphicx]{realboxes}
III. Inserting a single picture
\begin{figure}
\centering % indicates centering
\includegraphics[height=4.5cm,width=9.5cm]{}
% [height=4.5cm] indicates height
%[width=9.5cm]{} % [width=9.5cm] means width
%{} indicates an eps format image named 111
\caption{pic1}
\caption{pic1} denotes the name of the % image
\label{2}
The label of the % image, used for quoting in the article, notice that the number of the label may be different from the number displayed in the actual article
\end{figure}
Fourth, insert a single row of multiple charts without subheadings to share the big title
\begin{figure}[htbp]%%seek,[htbp]is a floating format
\subfigure[]{
\includegraphics[width=2.5cm,height=2.5cm]{figures//} \label{Fig.6(b)}
}
\hspace{2mm}
\subfigure[]{
\includegraphics[width=2.5cm,height=2.5cm]{figures//} \label{Fig.6(b)}
}
\hspace{2mm}
\subfigure[]{
\includegraphics[width=2.5cm,height=2.5cm]{figures//} \label{Fig.6(b)}
}
\caption{Geographical location and relationship of four types of bike stations }
\end {figure}
Note: Do not have a carriage return enter, otherwise the picture will automatically jump to the next line
There is a return to the car!!! -Single row to multiple rows
\begin{figure}[htbp]%%seek,[htbp]is a floating format
\subfigure[]{
\includegraphics[width=2.5cm,height=2.5cm]{figures//} \label{Fig.6(b)}
}
\hspace{2mm}
\subfigure[]{
\includegraphics[width=2.5cm,height=2.5cm]{figures//} \label{Fig.6(b)}
}
%% There's a carriage return.
\hspace{2mm}
\subfigure[]{
\includegraphics[width=2.5cm,height=2.5cm]{figures//} \label{Fig.6(b)}
}
\caption{Geographical location and relationship of four types of bike stations }
\end {figure}
Fifth, insert a single row of multiple charts with subheadings large title
\begin{figure}[htbp]%%seek,[htbp]is a floating format
\begin{minipage}[t]{0.3\linewidth} \label{Fig.4} %seek片占用一行宽度的30%
\hspace{2mm}
\includegraphics[width=3.5cm,height=2cm]{figures//}
\caption{The relationship between different types of sites.}
\end{minipage}
\begin{minipage}[t]{0.3\linewidth} \label{Fig.4} %seek片占用一行宽度的30%
\hspace{2mm}
\includegraphics[width=3.5cm,height=2cm]{figures//}
\caption{The relationship between different types of sites.}
\end{minipage}
\begin{minipage}[t]{0.3\linewidth} \label{Fig.4} %seek片占用一行宽度的30%
\hspace{2mm}
\includegraphics[width=3.5cm,height=2cm]{figures//}
\caption{The relationship between different types of sites.}
\end{minipage}
\end {figure}
As shown:
Note: If the image itself is too large, if you only resize the space occupied by the image0.3/linewith
, then the first picture will come outsuperimposeThe phenomenon. In this case, just readjust the height and width of the image to shrink it.
VI. Location of pictures
The latex defines two floating body environments:figure
respond in singingtable
, usually used for the layout of figures and tables respectively.
6.1 The syntax of the figure environment is formatted as follows:
\begin{figure} [(Allowed positions)]
(arbitrary content)
\end{figure}
6.2 Position parameters
The available environment is similar. One of the optional parameters (allowable position) is used to set the position on the page where the floating environment can appear, i.e., a combination of the four options h, t, b, and p:
- h Here (here), the contents of the floating body are placed in the context location where the code is located.
- t Top of page (top), the float is placed at the top of a page, this can be the page of the environment where the code is located or the page after it, note that when the page layout of the float may appear before the actual code.
- b Bottom of the page (bottom), the float is placed at the bottom of the page.
- d independent page (page), one or more floating body is placed in a separate page, this page is called a floating page (float page), with its counterpart, there is the body of the page is called the text page (text page).
6.3 Chestnuts
The option [hbp], for example, allows floats to appear in the environment, at the bottom of the page, or on a separate page, but not at the top of the page. The order of the options for allowing floats is not important; latex always starts withhtbp
The order tries to prevent floating body-images.
VII. Captions for pictures
The caption macro package defines theplain
cap (a poem)hang
Two formats. The default format isplain
.
7.1 plain
specification
\caption{default centered short title}
\caption{In plain format, if the title is long and folded into several lines, it will be displayed like a normal body paragraph. Just set the short caption, you can break the caption into several paragraphs.}
coding | Photo Demo |
---|---|
\caption{An architecture of GHRL model} |
![]() |
\caption{The data representation and information figure on the left shows the key information travel record and station information extracted from the bicycle network; The middle figure shows the temporary network and spatial networks built with the bicycle station as the node in the complex network and the relationship between nodes as the edge; The figure on the right shows the node features extracted according to different attributes in time and space and the topology between nodes.} |
![]() |
7.2 hang
specification
VIII. Spacing of pictures
\vspace{-0.2cm} %Adjusts the vertical distance between the picture and the OP
\setlength{\abovecaptionskip}{-0.2cm} %Adjust image caption distance from figure
\setlength{\belowcaptionskip}{-0.2cm} %Adjust image caption distance from below
original code
\begin{figure}[hbp]%% %figure, [htbp] is floating format
\vspace{-0.2cm} %Adjust the vertical distance between the image and the top of the page.
\setlength{\abovecaptionskip}{-0.8cm} %Adjust the distance between image caption and figure
\setlength{\belowcaptionskip}{-0.2cm} %Adjust image title distance from below
\begin{minipage}{0.45\linewidth}%%%%%%%%node1
\includegraphics[width=5.5cm,height=3.5cm]{}
\label{Fig.2}
\caption{MDP chain}
\end{minipage}%%%%%%%%%%node2
\begin{minipage}{0.45\linewidth}
\includegraphics[width=5.5cm,height=3.5cm]{}
\caption{Detour rule}
\label{Fig.3}
\end{minipage}
Photo Reference: