我是 tikz 新手,我不想要下图中红色框出的部分,我使用以下代码。我该如何更改我的代码?
\documentclass{standalone}
\usepackage{mathtools}
\usepackage{pgfplots}
\usepackage{siunitx}
\sisetup{per-mode=symbol}
\DeclareSIUnit{\fahrenheit}{\degree F}
\DeclareSIUnit{\pound}{lbm}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=700,xmax=2000,
ymin=0,ymax=50,
axis y line*=left,
xlabel={$p_0$ (psi)},
xlabel near ticks,
ylabel near ticks
]
\end{axis}
\end{tikzpicture}
\end{document}
答案1
你已经习惯了axis y line*=left
使用 y 轴仅有的在左侧,应用类似的选项,axis x line*=bottom,
似乎有效:
代码:
\documentclass{standalone}
\usepackage{mathtools}
\usepackage{pgfplots}
\usepackage{siunitx}
\sisetup{per-mode=symbol}
\DeclareSIUnit{\fahrenheit}{\degree F}
\DeclareSIUnit{\pound}{lbm}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=700,xmax=2000,
ymin=0,ymax=50,
axis y line*=left,
axis x line*=bottom,
xlabel={$p_0$ (psi)},
xlabel near ticks,
ylabel near ticks
]
\end{axis}
\end{tikzpicture}
\end{document}