Mathematica

Plotting the golden graph

Figure 1 in the paper:
M=22; a=(Sqrt[5]-1)/2; 
q:=Denominator[Last[Convergents[a,M]]]; g[x_]:=N[Cot[Pi*x]];
T[{k_, x_}] := {k+1,x+g[k*a]}; b = NestList[T,{1,0},q]; 
s = Table[b[[k,2]],{k,Length[b]-1}]; s = s/q; 
S1=Show[ListPlot[s, Joined ->True]]
golden graph
Click for large picture

Plotting the rational graph

<>
Figure 2 in the paper:
M=22; a=(Sqrt[5]-1)/2; 
q=Denominator[Last[Convergents[a,M]]];
g[x_]:=N[Cot[Pi*x]]; a1 = Last[Convergents[a,M]];
T[{k_,x_}]:={k+1,x+g[k a1]}; u=NestList[T,{1,0},q-1]/q;
S2=ListPlot[Table[u[[k,2]],{k,Length[u]}],Joined->True]
rational golden graph
Click for large picture

Plotting the caricature

Figure 3 in the paper:
M=10; a=(Sqrt[5]-1)/2;
G[x_,M_]:=Module[{z=0,s={}},
   Do[If[N[x-z]>N[a^k],
   s=Append[s,1];z+=a^k,s=Append[s,0]],{k,M}];s]
f[x_]:=Module[{},s=G[x,M]; 
   Sum[s[[k]] (-1)^(k-1) a^k,{k,M}]]
S3=Plot[f[x],{x,0,1}]
caricature of golden graph
Click for large picture