pgfplots 忽略轴的“粗”选项

pgfplots 忽略轴的“粗”选项

我遇到了以下代码的问题

\documentclass{standalone}
\usepackage{pgfplots}
 \usepgfplotslibrary{fillbetween}
 \usetikzlibrary{patterns}
\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={->}, 
    xlabel = $\rho_{S}$,
    ylabel = $\rho_{\tau}$,
    xlabel style={at=(current axis.right of origin), anchor=west},
    ylabel style={at=(current axis.above origin), anchor=south}
    ]
    \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}

轴没有按照选项所示画得那么粗thick。我得到:

在此处输入图片描述

而不是像

在此处输入图片描述

请原谅不同的缩放级别,但应该清楚的是,我没有得到thick斧头。

答案1

使用轴线样式 = 粗选项

\documentclass{standalone}
\usepackage{pgfplots}
 \usepgfplotslibrary{fillbetween}
 \usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[axis line style = thick, smooth, no markers,
    xmin = -1.1, xmax = 1.1,
    ymin = -1.1, ymax = 1.1,
    axis lines = center,
    axis line style={->}, 
    xlabel = $\rho_{S}$,
    ylabel = $\rho_{\tau}$,
    xlabel style={at=(current axis.right of origin), anchor=west},
    ylabel style={at=(current axis.above origin), anchor=south}
    ]
    \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}

参考:pgfplots - 如何将所有默认线宽/厚度值设置为某个值?

相关内容