/* Example posted by Olivier Guibé */ import graph_pi; texpreamble("\usepackage{amsmath}"); real g(real x){return (x^3-1)/5;} graphicrules(unit=1cm, xmin=-1, xmax=4, ymin=-2, ymax=5, ycrop=Crop); draw(graph(g),legend="$g:x\longmapsto (x^3-1)/5$"); cartesianaxis(); draw(graph(new real(real x){return x;}), grey); draw(recursivegraph(g,2.45,n=4), recursiveoption(Label(scale(.8)*"w",UnFill,align=2N), px=dashed, labelinner=false, automarker=nomarker, // xaxismarker=scale(.2)*MarkFill[0], circuitarrow=Arrow(position=Relative(.5))),.8green, legend="$w_{n+1}=g(z_{n})\;\text{et}\;w_{0}=2.45$"); attach(legend(), point(S), N);