我阅读了大多数类似问题的答案,但它们对我没有帮助。我有两个问题:这是我试图并排放置的两张图形。但是:
- 首先,它们相对于签名 a 和 b 发生了偏移,
- 其次,y 标签将大幅向左移动,这看起来也不好。
靠近,你可以看到我的代码和结果。
\documentclass[14pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{gnuplottex}
\begin{document}
\begin{figure}[h!]
\begin{subfigure} [b]{0.50\textwidth}
\centering
\fontsize{8}{8}\selectfont
\begin{gnuplot}
set terminal epslatex size 3,2
set grid
set xlabel "X"
set ylabel "Y $_a$"
set xrange [0:5]
set yrange [0:25]
plot x**2 title "x$^2$" w lp lc 8 pt 5 ps 1.1 lw 2
\end{gnuplot}
\caption{}
\end{subfigure}
\begin{subfigure} [b]{0.5\textwidth}
\centering
\fontsize{8}{8}\selectfont
\begin{gnuplot}
set terminal epslatex size 3,2
set grid
set xlabel "X"
set ylabel "Y $_a$"
set xrange [0:5]
set yrange [0:25]
plot x**2 title "x$^2$" w lp lc 8 pt 5 ps 1.1 lw 2
\end{gnuplot}
\caption{}
\end{subfigure}
\caption{blabla}
\end{figure}
\end{document}
答案1
您的图片太大:
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{gnuplottex,showframe}
\begin{document}
\begin{figure}
\begin{subfigure}[b]{\textwidth}
\centering
\footnotesize%
\begin{gnuplot}
set terminal epslatex size 3,2
set grid
set xlabel "X"
set ylabel "Y $_a$"
set xrange [0:5]
set yrange [0:25]
plot x**2 title "x$^2$" w lp lc 8 pt 5 ps 1.1 lw 2
\end{gnuplot}
\caption{}
\end{subfigure}
\begin{subfigure}[b]{\textwidth}
\centering
\footnotesize
\begin{gnuplot}
set terminal epslatex size 3,2
set grid
set xlabel "X"
set ylabel "Y $_a$"
set xrange [0:5]
set yrange [0:25]
plot x**2 title "x$^2$" w lp lc 8 pt 5 ps 1.1 lw 2
\end{gnuplot}
\caption{}
\end{subfigure}
\caption{blabla}
\end{figure}
\begin{figure}
\begin{subfigure}[b]{0.49\textwidth}
\footnotesize%
\begin{gnuplot}
set terminal epslatex size 2.5,1.75
set grid
set xlabel "X"
set ylabel "Y $_a$"
set xrange [0:5]
set yrange [0:25]
plot x**2 title "x$^2$" w lp lc 8 pt 5 ps 1.1 lw 2
\end{gnuplot}
\caption{}
\end{subfigure}
%
\begin{subfigure}[b]{0.49\textwidth}
\footnotesize
\begin{gnuplot}
set terminal epslatex size 2.5,1.75
set grid
set xlabel "X"
set ylabel "Y $_a$"
set xrange [0:5]
set yrange [0:25]
plot x**2 title "x$^2$" w lp lc 8 pt 5 ps 1.1 lw 2
\end{gnuplot}
\caption{}
\end{subfigure}
\caption{blabla}
\end{figure}
\end{document}