Code : Tout sélectionner
import graph_pi;
size(10cm);
graphicrules(xmin=-3, xmax=7, ymin=-4, ymax=4);
grid(xStep=1, xstep=0, yStep=1, ystep=0, lightgray);
real f1(real x) {return 0.25*(x-2)^2;}
path cf1=graph(f1,-2,6);
draw(cf1, red);
real f2(real x) {return (x-2)^2-3;}
path cf2=graph(f2,-2,6);
draw(cf2, green);
real f3(real x) {return -0.75*(x-2)^2+3;}
path cf3=graph(f3,-2,6);
draw(cf3, purple);
real f4(real x) {return 0.75*(x-2)^2+1;}
path cf4=graph(f4,-2,6);
draw(cf4, brown);
ylimits(-4, 6, Crop);
cartesianaxis(xticks=Ticks(NoZero, begin=false, end=false, Step=1, step=0),
yticks=Ticks(NoZero, begin=false, end=false, Step=1, step=0),
Arrow);
(erreur de débutant, trop de fatigue accumulées, ou autre ...)
Merci