LearningGuide

f animate plot3d sinxyt x02pi y02pi

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n also animate these. &gt; animate( plot3d,[ [s*time, t-time, s*cos(t*time)], &gt; 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. &gt; animate( plot3d, [(1.3)^theta * sin(t*phi), theta=-1..2*Pi, &gt; phi=0..Pi], t=1..8, coords=spherical ); For cylindrical coordinates, use coords=cylindrical. &gt; animate( plot3d, [sin(theta)*cos(z*t), theta=1..3, z=1..4], &gt; 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 speciﬁed title in the plot window, centered, and near the top. &gt; plot( sin(x), x=-2*Pi..2*Pi, title=&quot;Plot of Sine&quot; ); 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 (&quot;) 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. &gt; with(plots): Warning, the name changecoords has been redefined &gt; sphereplot( 1, theta=0..2*Pi, phi=0..Pi, &gt; scaling=constrained, title=&quot;The Sphere&quot;, &gt; 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. &gt; plot( x^2, x=0..3, labels=[&quot;time&quot;,&quot;velocity&quot;], &gt; 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 &gt; plot3d( sin(x*y), x=-1..1, y=-1..1, &gt; labels=[&quot;length&quot;, &quot;width&quot;, &quot;height&quot;], 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. &gt; plot( [sin(x), cos(x)], x=-3*Pi/2..3*Pi/2, linestyle=[1,4], &gt; legend=[&quot;The Sine Function&quot;, &quot;The Cosine Function&quot;] ); 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). &gt; 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