f animate plot3d sinxyt x02pi y02pi

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n also animate these. > animate( plot3d,[ [s*time, t-time, s*cos(t*time)], > s=1..3, t=1..4], time=2..4, axes=boxed); 2 2 2 2 2 2 2 2 –3 12 2 To animate a function in a coordinate system other than the Cartesian, use the coords option. Enter the following examples into Maple to 132 • Chapter 5: Plotting view the animations. For spherical coordinates, use coords=spherical. > animate( plot3d, [(1.3)^theta * sin(t*phi), theta=-1..2*Pi, > phi=0..Pi], t=1..8, coords=spherical ); For cylindrical coordinates, use coords=cylindrical. > animate( plot3d, [sin(theta)*cos(z*t), theta=1..3, z=1..4], > t=1/4..7/2, coords=cylindrical ); For a list of the coordinate systems in Maple, refer to the ?plots,changecoords help page. 5.4 Annotating Plots You can add text annotation to plots. The option title prints the specified title in the plot window, centered, and near the top. > plot( sin(x), x=-2*Pi..2*Pi, title="Plot of Sine" ); PlotofSine 1 0.5 0 –6 –4 –2 2 x 4 6 –0.5 –1 Important: When specifying the title, you must place double quotes (") around the text. Maple uses double quotes to delimit strings. Text that appears between double quotes is not processed further. To specify the font, style, and size of the title, use the titlefont option. > with(plots): Warning, the name changecoords has been redefined > sphereplot( 1, theta=0..2*Pi, phi=0..Pi, > scaling=constrained, title="The Sphere", > titlefont=[HELVETICA, BOLD, 24] ); 5.4 Annotating Plots • 133 TheSphere Labeling a Plot You can label a plot using the following options. • The labels option enables you to specify the labels on the axes • The labelsfont option allows you to control the label font and style • The labeldirections option enables you to place axis labels either vertically or horizontally. Note that the labels do not have to match the variables in the expression you are plotting. > plot( x^2, x=0..3, labels=["time","velocity"], > labeldirections=[horizontal,vertical] ); 8 6 velocity 4 2 0 0.5 1 1.5 time 2 2.5 3 Printing Labels You can print labels only if your plot displays axes. For three-dimensional graphs, there are no axes by default. You must use the axes option. 134 • Chapter 5: Plotting > plot3d( sin(x*y), x=-1..1, y=-1..1, > labels=["length", "width", "height"], axes=FRAMED ); 0.8 height –0.8 –1 width 1 1 length –1 To add a text legend to your plot, use the legend option. > plot( [sin(x), cos(x)], x=-3*Pi/2..3*Pi/2, linestyle=[1,4], > legend=["The Sine Function", "The Cosine Function"] ); 1 0.5 –4 –2 –0.5 –1 TheSineFunction TheCosineFunction 2x 4 5.5 Composite Plots Maple allows you to display several plots simultaneously after assigning names to the individual plots. Since plot structures are usually large, end the assignments with colons (rather than semicolons). > my_plot := plot( sin(x), x=-10..10 ): Y...
View Full Document

This note was uploaded on 08/27/2012 for the course MATH 1100 taught by Professor Nil during the Spring '12 term at National University of Singapore.

Ask a homework question - tutors are online