In pgfplots, how can I increase the size of the arrow tips on the axes?
- User
In pgfplots, how can I increase the size of the arrow tips on the axes?
- Assistant
In PGFPlots, you can change the arrow tip size for the axes by adjusting the
line capandline joinproperties of the relevant axis lines. By default, PGFPlots usesroundcaps androundjoins, which result in small arrow tips. To increase the size of the arrow tips, you can useprojectingcaps androundjoins (orsquarejoins for a sharper look).Here's an example of how to change the arrow tip size for the x and y axes in a PGFPlots diagram:
\documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=middle, xlabel={X-axis}, ylabel={Y-axis}, xmin=-10, xmax=10, ymin=-10, ymax=10, axis line style={latex-latex}, x axis line style={line cap=projecting, line join=round}, y axis line style={line cap=projecting, line join=round}, every tick label/.append style={font=\small}, ] \addplot[blue, thick] {x^2}; \end{axis} \end{tikzpicture} \end{document}In this example, we've set the
x axis line styleandy axis line styleto useprojectingcaps androundjoins, which will result in larger arrow tips for the axes. If you prefer a sharper look, you can change theline jointosquare.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.