4
$\begingroup$

I am interested to plot a convergence result of the Fibonacci sequence, namely $\frac{F(n+1)}{F(n)}\rightarrow\phi$ as $n\rightarrow\infty$.

So far I have created the following plot:

enter image description here

So, I am wondering if there is a way to connect the points but at the same time the points being visible.

Thank you.

Also, my code is this:

ListPlot[Table[Fibonacci[n + 1]/Fibonacci[n], {n, 20}], PlotRange -> {{0, 22}, {0, 2.5}},
Ticks -> {{1, 2, 3, 4, 5, 10, 15, 20}, {GoldenRatio}}, 
AxesStyle -> Directive[Arrowheads[0.03]], PlotStyle -> Directive[Black], 
TicksStyle -> Directive[Red, 15]]
$\endgroup$
2
  • 3
    $\begingroup$ Use ListLinePlot instead of ListPlot and add the option Mesh -> Full. $\endgroup$
    – march
    Nov 10, 2015 at 17:19
  • 3
    $\begingroup$ The next time you're producing ratios of Fibonacci numbers: Ratios[Fibonacci[Range[20]]]. For extra fun, replace, Fibonacci[] with LucasL[]. $\endgroup$ Nov 11, 2015 at 3:05

2 Answers 2

6
$\begingroup$

A solution using Epilog:

ListLinePlot[
 t = Table[Fibonacci[n + 1]/Fibonacci[n], {n, 20}],
 PlotRange -> {{0, 22}, {0, 2.5}},
 Ticks -> {{1, 2, 3, 4, 5, 10, 15, 20}, {GoldenRatio}},
 AxesStyle -> Directive[Arrowheads[0.03]],
 PlotStyle -> Directive[Black],
 TicksStyle -> Directive[Red, 15],
 Epilog -> {PointSize[0.013], Point[Transpose[{Range[20], t}]]}]

enter image description here

$\endgroup$
3
$\begingroup$

Add the last two options

ListPlot[Table[Fibonacci[n + 1]/Fibonacci[n], {n, 20}],
 PlotRange -> {{0, 22}, {0, 2.5}},
 Ticks -> {{1, 2, 3, 4, 5, 10, 15, 20}, {GoldenRatio}},
 AxesStyle -> Directive[Arrowheads[0.03]],
 PlotStyle -> Directive[Black],
 TicksStyle -> Directive[Red, 15],
 Joined -> True,
 PlotMarkers -> Automatic]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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