# How to draw a normalized tangent arrow [closed]

I want to draw a normalized tangent arrow, so I use the Normalize command as follows:

tangent =
Table[{{t, Sin[t]}, {t, Sin[t]} + Normalize @ {1, Cos[t]}}, {t, -π, π, π/2}];
Plot[Sin[x], {x, -2 π, 2 π},
PlotRange -> 2, Epilog -> {Red, Arrowheads[0.02], Arrow /@ tangent}]

and I get this plot:

Seems good, but if take a close look at the length of the arrows, you'll see that the length is not normalized at all. I've tried the Show and Graphics command instead of Epilog, but got the same plot.

Can someone tell me what I missed here?

• Your plot is distorted by the default aspect ratio of 1/GoldenRatio. Add AspectRatio -> Automatic to your plot options Aug 4, 2014 at 3:56

This issue here is aspect ratio: Using the following slight adaptation of your code:

tangent =
Table[{{t, Sin[t]}, {t, Sin[t]} +
Normalize@{1, Cos[t]}}, {t, -\[Pi], \[Pi], \[Pi]/2}];
Plot[Sin[x], {x, -2 \[Pi], 2 \[Pi]}, PlotRange -> 2,
Epilog -> {{Red, Arrowheads[0.02], Arrow /@ tangent},
Circle[{#, Sin[#]}] & /@ Range[-\[Pi], \[Pi], \[Pi]/2]}]

However, specifying aspect ratio:

tangent =
Table[{{t, Sin[t]}, {t, Sin[t]} +
Normalize@{1, Cos[t]}}, {t, -\[Pi], \[Pi], \[Pi]/2}];
Plot[Sin[x], {x, -2 \[Pi], 2 \[Pi]}, PlotRange -> 2,
Epilog -> {{Red, Arrowheads[0.02], Arrow /@ tangent},
Circle[{#, Sin[#]}] & /@ Range[-\[Pi], \[Pi], \[Pi]/2]},
AspectRatio -> Automatic]

resolves matters:

• Thanks a lot. I have another small question. Since many of the default values of options in Mathematica is Automatic, Why WRI choose the default value of the AspectRatio as 1/GoldenRatio? I mean, why not choose Automatic, then in the algorithms(or in the front-end or something like that), Automatic use 1/GoldenRatio as default value? This seems more coherent to me. Aug 4, 2014 at 4:30
• @luyuwuli I am afraid I cannot answer that...as humans we make so many arbitrary decisions and adopt arbitrary conventions, August having 31 days, Julian v Gregorian calendar, tau v pi as well as the countless debates in everyday life...I am sure there were reasons, like appeal of golden ratio to human aesthetics etc Aug 4, 2014 at 4:52
• Hahaha... Yes, I agree. I ask this because I've suffered a lot in the AspectRatio issue. Aug 4, 2014 at 5:02
• Jul 2, 2016 at 13:36