1

I'm having a problem with the following code

\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}

The axes aren't drawn thick as indicated by the option thick. I get:

enter image description here

instead of something like

enter image description here

Excuse the different zooms levels but it should be clear that I'm not getting thickaxes.

user2249626
  • 1,653

1 Answers1

3

Use the axis line style = thick option

\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}

Ref: pgfplots - How can I set all the default line widths / thickness values to a certain value?