我绘制了这两个图,但是在乳胶中它们被绘制在彼此之下,我不希望它们被绘制在彼此之下,我希望它们被绘制在彼此附近一定距离处?我怎样才能做到这一点?
\documentclass{report}
\usepackage{graphicx} % Required for inserting images
\usepackage{mathtools}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{tikzpicture}
\begin{axis}[
width=54mm,
axis x line=bottom,
axis y line=center,
xmin = -3, xmax = 3,
ymax = 2.2,
xtick={-2, -1, 0, 1, 2},
ytick={1},
xlabel={$t$},
every axis x label/.style={at={(1,0)},anchor=south east},
ylabel={$h(t)$}
]
\addplot+[thick,mark=none] coordinates
{(0,0) (0,1) (2,1) (2,0)} ;
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
width=54mm,
axis x line=bottom,
axis y line=center,
xmin = -3, xmax = 3,
ymax = 2.2,
xtick={-2, -1, 0, 1, 2},
ytick={1},
xlabel={$t$},
every axis x label/.style={at={(1,0)},anchor=south east},
ylabel={$h(t)$}
]
\addplot+[thick,mark=none] coordinates
{(0,0) (0,1) (2,1) (2,0)} ;
\end{axis}
\end{tikzpicture}
答案1
\qquad
在两个图之间添加:
\end{axis}
\end{tikzpicture}\qquad
\begin{tikzpicture}
\begin{axis}[
答案2
根据您的需要,您还可以关注这一策略:
- 为每个绘图创建单独的文件
Tikz
并进行编译 - 用来
\includegraphics
包括他们.pdf
的 - 您可以嵌入到
figure environment
- 可以将
subfigures
它们并排放置,并带有子标题
接下来是来自上述链接的屏幕截图,它还告诉您工作流程的优势。它并排显示了两个 Tikz 绘图...