Skip to content
TheChatArchiveThe Chat Archive
vicuna-33b· LMSYSHugging Face Arena Human Preference 55K

In pgfplots, how can I increase the size of the arrow tips on the axes?

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Yiyi-34b-chat’s answer.
  1. User

    In pgfplots, how can I increase the size of the arrow tips on the axes?

  2. Assistant

    In PGFPlots, you can change the arrow tip size for the axes by adjusting the line cap and line join properties of the relevant axis lines. By default, PGFPlots uses round caps and round joins, which result in small arrow tips. To increase the size of the arrow tips, you can use projecting caps and round joins (or square joins 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 style and y axis line style to use projecting caps and round joins, which will result in larger arrow tips for the axes. If you prefer a sharper look, you can change the line join to square.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.