每当我想要轴经过 (0,0) 时都axis lines=middle
可以。但是
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[clip=false, axis lines = middle, xtick=\empty, ytick=\empty]
% CURVE
\addplot [smooth,tension=0.9] coordinates {(1,4.8)(1.5,3)(3.5,2)(5,-4)(6,3)(7,4.5)};
% Pin showing where's axis intersection
\addplot [mark=x] coordinates {(1,0)} node [pin={[pin edge={black}]320:{$(1,0)$}}]{};
\end{axis}
\end{tikzpicture}
\end{document}
生产
预期输出:
axis lines
我以为和之间的区别axis lines*
只是箭头。但在这个例子中,axis lines*=middle
轴交点在 (0,0),那么为什么axis lines=middle
不呢?