I noticed something strange recently when trying to use rounded corners
in pgfplots: it totally ruins the plot. See below without rounded corners:
and then with rounded corners:
Here is a minimal example:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}[scale=0.8,trim axis left, trim axis right]
\tikzset{every mark/.append style={scale=0.6}}
\pgfplotsset{legend style={font=\footnotesize}}
\begin{axis}[ grid=both,
rounded corners,
]
\addplot[samples=100,color=blue,very thick,smooth,domain=-10:10] {cos(x^(3))};
\end{axis}
\end{tikzpicture}
\end{document}
Thanks in advance for your ideas !
Best Answer
If you only want the axis lines to be rounded, you need to set the
axis line style
key. Otherwise,pgfplots
applies therounded corners
style to all of the lines it draws, including the plots.