I am trying to add arrows pointing on the axis lines for the following graph:





\begin{tikzpicture}[scale=1.75,line width=1pt]
color= gray,
axis equal image, 
axis lines=middle, 
xtick distance=1,
ytick distance=1,
legend pos=outer north east,

\addplot[red, smooth, domain=-4.9:4.9] {(8)/(4 + x^2)}; 

\addplot[blue, smooth, domain=-4.9:4.9]{(-16*x)/((4+x^2)^2)};

\addplot[green, smooth, domain=-4.9:4.9]{-(((16)*((4 + x^2)^2))-((4 + x^2)* 


\caption{Plotting the curve when $r=1$.}



Here is the output of the code:


See how only the top and the right end of the axis lines have arrow pointers, and the bottom and the left do not? Is there a way so I could get some on all four ends?




every inner x axis line/.append style={stealth-stealth},
every inner y axis line/.append style={stealth-stealth},

at the end of your axis options, just after the legend pos=outer north east, and just before the ]

See section 4.9.9 of the current reference manual.

If you are happy with them both being the same, you could just set a single key (as pointed out in the comments):

inner axis line style={stealth-stealth}
  • 2
    Slightly shorter would be inner axis line style={stealth-stealth}. – Torbjørn T. Oct 21 '18 at 20:57
  • Great response, a quick easy solution to my problem! Much appreciated! – Aiden Kenny Oct 22 '18 at 1:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.