我正在尝试将中使用的轴箭头样式更改为使用pgfplots
中获得的默认样式,即tikz
->
我做了一些研究,但似乎找不到方法。
答案1
使用axis line style={->}
。
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis lines=left,axis line style={->}]
\end{axis}
\end{tikzpicture}
\end{document}
随着OP新添加的代码:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\begin{axis}[thick, smooth, no markers,
xmin = -1.1, xmax = 1.1,
ymin = -1.1, ymax = 1.1,
axis lines = center,
axis line style={->}, %% put here
xlabel = $\rho_{S}$,
ylabel = $\rho_{\tau}$
]
\addplot+[name path = OBEN, samples = 1000, black, domain = -1:1]
{min(1, 0.5+1.5*x)};
\addplot+[name path = UNTEN, samples = 1200, black, domain= -1:1]
{max(-1, -0.5+1.5*x)};
\addplot[pattern = north west lines] fill between[of=OBEN and UNTEN];
\end{axis}
\end{tikzpicture}
\end{document}