> with(plots): -------------------------------------------------------------------------------- > with(plots); [animate, animate3d, conformal, contourplot, cylinderplot, densityplot, display, display3d, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, loglogplot, logplot, matrixplot, odeplot, pointplot, polarplot, polygonplot, polygonplot3d, polyhedraplot, replot, setoptions, setoptions3d, spacecurve, sparsematrixplot, sphereplot, surfdata, textplot, textplot3d, tubeplot] -------------------------------------------------------------------------------- > ?animate -------------------------------------------------------------------------------- > animate( [u*sin(t),u*cos(t),t=-Pi..Pi],u=1..8,view=[-8..8,-8..8]); -------------------------------------------------------------------------------- > plot3d([u*sin(t),u*cos(t),u], t=-Pi..Pi, u=1..8); -------------------------------------------------------------------------------- > ?animate3d -------------------------------------------------------------------------------- > animate3d(cos(t*x)*sin(t*y),x=-Pi..Pi, y=-Pi..Pi,t=1..2); -------------------------------------------------------------------------------- > piechart := proc(sectors)\ # sectors is the number of different sectors plotted\ local plot;\ plot :=\ seq( # sequence of color plots\ plots[polygonplot]([[0,0],# first point of triangle\ # second point of triangle\ [cos(2*Pi*i/sectors),sin(2*Pi*i/sectors)],\ # third point of triangle\ [cos(2*Pi*(i+1)/sectors), sin(2*Pi*(i+1)/sectors)]\ ],\ color=COLOR(HUE,i/sectors)\ ), # finishes a single plot\ i=0..(sectors-1) # range of sequence\ );\ plots[display]([plot]);\ end; # piechart\ Warning, `i` is implicitly declared local piechart := proc(sectors) local plot,i; plot := seq(plots[polygonplot]([[0,0], [cos(2*Pi*i/sectors),sin(2*Pi*i/sectors)], [cos(2*Pi*(i+1)/sectors),sin(2*Pi*(i+1)/sectors)]], color = COLOR(HUE,i/sectors)),i = 0 .. sectors-1); plots[display]([plot]) end -------------------------------------------------------------------------------- > piechart(10); -------------------------------------------------------------------------------- > piechart(25); -------------------------------------------------------------------------------- > seq(1,2,3); Error, wrong number (or type) of parameters in function seq -------------------------------------------------------------------------------- > seq(i,i=1..3); 1, 2, 3 -------------------------------------------------------------------------------- > ?color -------------------------------------------------------------------------------- > ?hue The argument passed to help was: hue Sorry, unable to explain this topic. See ?index for a list of topics which are available. -------------------------------------------------------------------------------- > ?HUE The argument passed to help was: HUE Sorry, unable to explain this topic. See ?index for a list of topics which are available. -------------------------------------------------------------------------------- > piechart(100); -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- >