标题远离图片

标题远离图片

我使用命令制作了一个框图\framebox。图的标题和底部之间存在很大的空白。我该如何减少它?代码:

\begin{figure*}[!t]
\setlength{\unitlength}{0.13in} % selecting unit length
\centering % used for centering Figure
\begin{picture}(48,8.2) % picture environment with the size (dimensions) % 32 length units wide, and 15 units high.
\put(3,4){\framebox(4,6){\parbox{1cm}{Symbol\\ Mapping} }}
\put(10,4){\framebox(5,6){\parbox{1cm}{Serial\\ to\\ Parallel\\ Converter} }}
\put(19,4){\framebox(4,6){\parbox{1cm}{IFFT} }}
\put(27,4){\framebox(5,6){\parbox{1cm}{Parallel to Serial \\Converter} }}
\put(36,4){\framebox(4,6){\parbox{1cm}{Cyclic Prefix} }}
\put(43,4){\framebox(4,6){\parbox{1cm}{DAC} }}
\put(0,7){\vector(1,0){3}}\put(7,7){\vector(1,0){3}}
\put(15,5){\vector(1,0){4}} \put(17,6.4){.} \put(17,7.15){.} \put(15,7.8){\vector(1,0){4}}\put(15,9.2){\vector(1,0){4}}
\put(23,5){\vector(1,0){4}} \put(25,6.4){.} \put(25,7.15){.} \put(23,8){\vector(1,0){4}}\put(23,9){\vector(1,0){4}}
\put(32,7){\vector(1,0){4}} \put(40,7){\vector(1,0){3}}\put(47,7){\vector(1,0){3}}
\put(0,8) {\parbox{1cm}{Input\\Data} } \put(8,8) {\textbf{X}}
\put(16.2,5.2){${\small X}_{{\small N-1}}$} \put(16.2,8.2){${\small X}_{{\small 1}}$} \put(16.2,9.4){${\small X}_{{\small 0}}$} 
\put(24.2,5.2){${\small x}_{{\small N-1}}$} \put(24.2,8.2){${\small x}_{{\small 1}}$} \put(24.2,9.4){${\small x}_{{\small 0}}$}
\put(47.4,8) {x(t)}
\end{picture}
\caption{Block Diagram of OFDM transmitter} % title of the Figure
\label{Model} % label to refer figure in text
\end{figure*}

答案1

为了调试,请放在fbox您的周围picture(另外,请始终发布完整的文档)

在此处输入图片描述

在这里您可以看到,您使用的 y 坐标\put都太高了,这些项目将会在图片上方打印文本,并在下方留下很大的空间。

我还删除了,[!t]其主要作用是防止页面浮动并使图形更难放置。

\documentclass[twocolumn]{article}
\begin{document}
\begin{figure*}
\setlength{\unitlength}{0.13in} % selecting unit length
\centering % used for centering Figure
\fbox{\begin{picture}(48,8.2) % picture environment with the size (dimensions) % 32 length units wide, and 15 units high.
\put(3,4){\framebox(4,6){\parbox{1cm}{Symbol\\ Mapping} }}
\put(10,4){\framebox(5,6){\parbox{1cm}{Serial\\ to\\ Parallel\\ Converter} }}
\put(19,4){\framebox(4,6){\parbox{1cm}{IFFT} }}
\put(27,4){\framebox(5,6){\parbox{1cm}{Parallel to Serial \\Converter} }}
\put(36,4){\framebox(4,6){\parbox{1cm}{Cyclic Prefix} }}
\put(43,4){\framebox(4,6){\parbox{1cm}{DAC} }}
\put(0,7){\vector(1,0){3}}\put(7,7){\vector(1,0){3}}
\put(15,5){\vector(1,0){4}} \put(17,6.4){.} \put(17,7.15){.} \put(15,7.8){\vector(1,0){4}}\put(15,9.2){\vector(1,0){4}}
\put(23,5){\vector(1,0){4}} \put(25,6.4){.} \put(25,7.15){.} \put(23,8){\vector(1,0){4}}\put(23,9){\vector(1,0){4}}
\put(32,7){\vector(1,0){4}} \put(40,7){\vector(1,0){3}}\put(47,7){\vector(1,0){3}}
\put(0,8) {\parbox{1cm}{Input\\Data} } \put(8,8) {\textbf{X}}
\put(16.2,5.2){${\small X}_{{\small N-1}}$} \put(16.2,8.2){${\small X}_{{\small 1}}$} \put(16.2,9.4){${\small X}_{{\small 0}}$} 
\put(24.2,5.2){${\small x}_{{\small N-1}}$} \put(24.2,8.2){${\small x}_{{\small 1}}$} \put(24.2,9.4){${\small x}_{{\small 0}}$}
\put(47.4,8) {x(t)}
\end{picture}}
\caption{Block Diagram of OFDM transmitter} % title of the Figure
\label{Model} % label to refer figure in text
\end{figure*}

\end{document}

答案2

我不太清楚是什么原因造成了图片和标题之间的这么大的差距(也许图形环境本身也添加了一个空格),但如果只是一种情况,你可以做的是将以下命令放在\begin{figure}

\begingroup\setlength{\abovecaptionskip}{-6ex}

在你结束图后你写下

\endgroup

这会将标题上方的空间设置为 -6 ex,并将标题推到图形的合理距离内。

但我确信有更清洁的解决方案。

也许还值得一看的是蒂克兹我认为这个包使得绘图变得容易多了。

相关内容