Module 9: Plaatjes in twee dimensies
\302\2479.2: Het tekenen van geparametriseerde en impliciet gegeven krommen
\302\2479.3: Teksten, punten en lijnen
pointplot
restart; with(plots):
f := x -> x^3-x+1/2;
functie := plot(f,-1..1):
meetwaarden := [[-.900, .721], [-.500, .879], [0.020, .420], [.200, .338], [.550, 0.016], [.950, .447]]:
meetpunten := pointplot( meetwaarden, symbol=solidcircle, symbolsize=20 ):
display( {functie,meetpunten} );
Grafieken, teksten, punten en lijnen in een tekening
restart; with(plots):
p1 := plot( exp(x), x=-3..3, y=-3..3,
color=red, thickness=2 ):
p2 := plot( ln(x), x=0..3, y=0..3,
color=blue, thickness=2):
p3 := textplot( [1, exp(1), exp(x)],
align={RIGHT,BELOW}, font=[TIMES,16] ):
p4 := textplot( [2, ln(2), typeset("inverse: ",ln(x))],
align={LEFT,ABOVE}, font=[TIMES,ITALIC,12] ):
display( {p1,p2,p3,p4}, scaling=constrained,
labels=["x","f(x)"], labelfont=[HELVETICA,10],
labeldirections=[horizontal,vertical], titlefont=[TIMES,16],
title="Een functie en zijn inverse",
caption=typeset(exp(x)," (rood), ", ln(x)," (blauw).") );
6.4: Opties
Animaties
restart;
f := (x,t) -> exp(-x/30)*cos(x/5-3*t);
plotlijst := [seq( plot(f(x,t), x=0..120 ), t=0..evalf(2*Pi), 0.1 )]:
with(plots):
display(plotlijst, insequence=true );
Alternatief:
animate( plot, [f(x,t), x=0..120], t=0..evalf(2*Pi), frames=50 );