Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import geometry;
- import graph;
- size(9cm, 0);
- defaultpen(fontsize(12pt));
- dotfactor = 4;
- picture axis;
- real xmin = -5, xmax = 5,
- ymin = -5, ymax = 5;
- xaxis(axis, xmin=xmin, xmax=xmax,
- Ticks(scale(.7)*Label(align=E, Fill(white) ),
- NoZero,
- beginlabel=false, endlabel=false,
- begin=false, end=false,
- Step=0, step=0,
- Size=0mm, size = 0mm),
- Arrow(2mm),true);
- yaxis(axis, ymin=ymin, ymax=ymax,
- // Ticks(scale(.7)*Label(align=W, Fill(white) ),
- // NoZero,
- // beginlabel=false, endlabel=false,
- // begin=false, end=false,
- // Step=0, step=0,
- // Size=0mm, size = 0mm),
- Arrow(2mm),true);
- real f(real x){
- return x^3-1.5*x^2;
- }
- path Cf = graph(f, xmin, xmax, n = 400);
- draw(Cf,green+1pt);
- label("$x$", (xmax,0), 2S);
- label("$y$", (0,ymax), 2W);
- //label(scale(.7)*"$0$", origin, S+W, UnFill);
- ylimits(ymin, ymax, Crop);
- add(axis);
- addMargins(2mm,2mm);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement