Asymptote Generalities – fig0120

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 9 h 39 min

Figure 0012
(Compiled with Asymptote version 2.14svn-r5318)
    
// From Asympote's FAQ
size(6cm,0);

path p=(0,0)--(1,0); 
frame object; 
draw(object,scale(3cm)*p); 
 
add(object); 
add(object,(0,-10)); 


Étiquettes : , , , ,


Asymptote Generalities – fig0760

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 1 h 39 min

Figure 0076
(Compiled with Asymptote version 2.14svn-r5318)
    
frame f;
label(f,"\textbf{Hello}",yellow,Fill(black));  
add(scale(2)*rotate(45)*f);

Étiquettes : , , ,


Asymptote Generalities – fig0770

Category: Asymptote,Examples 2D,GeneralitiesPh. Ivaldi @ 2 h 39 min

Figure 0077
(Compiled with Asymptote version 2.14svn-r5318)
    
frame f;
filldraw(scale(3cm)*unitsquare,black);
label(f,"Hello",.8red,Fill(white));  
add(scale(2)*rotate(45)*f,(1.5cm,1.5cm));

Étiquettes : , , ,


Official Asymptote example – errorbars

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 22 h 57 min

Figure 0058
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
import graph;

picture pic;
real xsize=200, ysize=140;
size(pic,xsize,ysize,IgnoreAspect);

pair[] f={(5,5),(50,20),(90,90)};
pair[] df={(0,0),(5,7),(0,5)};

errorbars(pic,f,df,red);
draw(pic,graph(pic,f),"legend",
     marker(scale(0.8mm)*unitcircle,red,FillDraw(blue),above=false));

scale(pic,true);

xaxis(pic,"$x$",BottomTop,LeftTicks);
yaxis(pic,"$y$",LeftRight,RightTicks);
add(pic,legend(pic),point(pic,NW),20SE,UnFill);

picture pic2;
size(pic2,xsize,ysize,IgnoreAspect);

frame mark;
filldraw(mark,scale(0.8mm)*polygon(6),green,green);
draw(mark,scale(0.8mm)*cross(6),blue);

draw(pic2,graph(pic2,f),marker(mark,markuniform(5)));

scale(pic2,true);

xaxis(pic2,"$x$",BottomTop,LeftTicks);
yaxis(pic2,"$y$",LeftRight,RightTicks);

yequals(pic2,55.0,red+Dotted);
xequals(pic2,70.0,red+Dotted);

// Fit pic to W of origin:
add(pic.fit(),(0,0),W);

// Fit pic2 to E of (5mm,0):
add(pic2.fit(),(5mm,0),E);


Étiquettes : , , , ,