그림 캡션이 너무 낮습니다(LaTeX 파일 이미지 사용).

그림 캡션이 너무 낮습니다(LaTeX 파일 이미지 사용).

내가 만든 이미지를 업로드하고 있습니다.gnuplot내 문서를 사용하여;

\begin{figure}[tbp]
\begin{center}
\input{plot.tex}
\caption{Graph caption}
\label{fig4}
\end{center}
\end{figure}

문제는 다음과 같습니다.

http://postimg.org/image/j4i4oylx9/

그림 설명이 너무 낮습니다. 이것이 LaTeX 또는 gnuplot의 문제인지 알 수 없습니다. gnuplot의 마진을 줄이는 방법을 찾아보았지만 소용이 없었습니다.

사진과 캡션의 간격을 줄이려면 어떻게 해야 하나요?

누군가 필요하다면 이것은 나의 gnuplot 자료입니다.

 set terminal latex
 set out 'plot.tex'
 set termoption dash

 set xrange [0:20]
 set yrange [-1:1]

 unset colorbox


 plot besj1(x)  ls 1 title '$J_1(x)$',\
 besy1(x)  ls 11 title '$Y_1(x)$',  \

set label 5 '$J_1(x)$' at 2, 0.7
set label 6 '$Y_1(x)$' at 4.5, 0.45
set size 1, 0.75

unset key
set out

답변1

latexgnuplot의 터미널이 플롯 주위에 빈 공간을 제공하는 것 같습니다 . 으로 볼 수 있어요

\documentclass{article}
\begin{document}
\begin{figure}
\centering
\fbox{\input{plot.tex}}
\caption{Graph caption}
\end{figure}
\end{document}

생산하는

여기에 이미지 설명을 입력하세요

gnuplot 내에서 이 마진을 억제하는 방법을 모르지만(사용하지 않고 오랜 시간이 걸렸습니다 ;-)) plot.tex.

이 파일은 다음으로 시작합니다.

% GNUPLOT: LaTeX picture
\setlength{\unitlength}{0.240900pt}
\ifx\plotpoint\undefined\newsavebox{\plotpoint}\fi
\sbox{\plotpoint}{\rule[-0.200pt]{0.400pt}{0.400pt}}%
\begin{picture}(1500,900)(0,0)
\sbox{\plotpoint}{\rule[-0.200pt]{0.400pt}{0.400pt}}%

(1500,900)은 그림의 오른쪽 상단 모서리와 (0,0)왼쪽 하단 모서리입니다. (0,0)로 변경하고 (0,40), 저장하고 plot.tex, 다시 컴파일하면 다음을 얻게 됩니다:

여기에 이미지 설명을 입력하세요

이와 같이 많은 수치를 작성해야 한다면 다른 터미널(eps, pdf, tikz)을 선택하거나 pgfplotsgnuplot을 호출하여 Bessel 함수를 계산할 수 있는 터미널을 사용하는 것이 좋습니다.

답변2

pgfplots대안은 with addplot및 Capability를 통해 플롯하는 것입니다 gunplot. 그런 다음 를 사용하여 caption그림과 캡션 사이의 간격을 조정합니다.

여기에 이미지 설명을 입력하세요

암호

\documentclass{article}
\usepackage[margin=0.5cm,papersize={12cm,10cm}]{geometry}
\usepackage{pgfplots}
\usepackage{tikz,pgfplotstable}
\usepackage[font=small,skip=0pt]{caption}
\pgfplotsset{compat=1.8}

\begin{document}

\begin{figure}[htbp]
\centering
%\input{plot.tex}
\begin{tikzpicture}
\begin{axis}[
width=10cm,
height=5cm,ymin=-1,ymax=1,
xmin=0,xmax=20,
]
\addplot[color=yellow,
solid, line width=1.0pt,
domain=0:20, samples=400]
gnuplot {besj1(x)};
\node at (axis cs: 6,0.5){$Y_1(x)$};
\addplot[color=blue,
solid, line width=1.0pt, restrict y to domain=-1:1,
domain=0:20,samples=400]
gnuplot {besy1(x)};
\node at (axis cs: 2,0.7){$J_1(x)$};
\end{axis}
\end{tikzpicture}
\caption{Graph caption}
\label{fig4}
\end{figure}

\end{document}

관련 정보