Advertisement
sutasuu

graph9

Oct 17th, 2024 (edited)
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Asymptote 1.06 KB | Source Code | 0 0
  1. import geometry;
  2. import graph;
  3. import contour;
  4.  
  5. size(9cm, 0);
  6. defaultpen(fontsize(12pt));
  7. dotfactor = 4;
  8. picture axis;
  9.  
  10. real xmin = -6, xmax = 6,
  11.      ymin = -5, ymax = 5;
  12. xaxis(axis, xmin=xmin, xmax=xmax,
  13.     Ticks(scale(.7)*Label(align=E, Fill(white) ),
  14.           NoZero,
  15.           beginlabel=false, endlabel=false,
  16.           begin=false, end=false,
  17.           Step=0, step=0,
  18.           Size=0mm, size = 0mm),
  19.           Arrow(2mm),true);
  20.  
  21. yaxis(axis, ymin=ymin, ymax=ymax,
  22.     // Ticks(scale(.7)*Label(align=W, Fill(white) ),
  23.     //      NoZero,
  24.     //      beginlabel=false, endlabel=false,
  25.     //      begin=false, end=false,
  26.     //      Step=0, step=0,
  27.     //      Size=0mm, size = 0mm),
  28.           Arrow(2mm),true);
  29.  
  30. real f(real x,real y){
  31.   return y*cos(x)-1;
  32. }
  33. guide[][] Cf = contour(f,(xmin,ymin),(xmax,ymax),nx=400,ny=400, new real[]{0}, operator ..);
  34. draw(Cf[0], green+1pt);
  35.  
  36. label("$x$", (xmax,0), 2S);
  37. label("$y$", (0,ymax), 2W);
  38. //label(scale(.7)*"$0$", origin, S+W, UnFill);
  39. ylimits(ymin, ymax, Crop);
  40. add(axis);
  41. addMargins(2mm,2mm);
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement