# 2.4 More on Plots # Art Belmonte, Summer 1996 # These are the shaded gray examples which appear in Section 2.4. > restart; f:=(x - 0.21) / abs(x - 0.21); > plot(f, x=-2..2, style=point); x - .21 f := ----------- | x - .21 | > plot(f, x=-2..2, style=point, numpoints=70); > f:=sin(2*x + y); > plot3d(f, x=-5..5, y=-5..5, style=patch); f := sin(2 x + y) > f:=(x, y)->sin(2*x + y); > plot3d(f(x, y), x=-5..5, y=-5..5); f := (x, y) -> sin(2 x + y) > plot3d(f, -5..5, -5..5); # Use this form (a list of lists; i.e., a list of ordered pairs) to # produce the intended plot. > mylist:=[ [1, 2], [-2, 3], [4, 4] ]; mylist := [[1, 2], [-2, 3], [4, 4]] > plot(mylist, style=point); # Using a list like this just graphs the constant functions y=1, y=2, # y=-2, y=3, y=4, which is NOT what was intended! Here Release 4 differs # from Release 3. > mylist:=[1, 2, -2, 3, 4, 4]; mylist := [1, 2, -2, 3, 4, 4] > plot(mylist, style=point); > f:=x^2; g:=2*x - 3; > p1:=plot(f, x=-1..1): p2:=plot(g, x=0..2): > with(plots); display([p1, p2]); 2 f := x g := 2 x - 3 [animate, animate3d, changecoords, complexplot, complexplot3d, conformal, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, display3d, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, odeplot, pareto, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedraplot, replot, rootlocus, semilogplot, setoptions, setoptions3d, spacecurve, sparsematrixplot, sphereplot, surfdata, textplot, textplot3d, tubeplot] >