12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.5 Composite Plots • 129> f := animate3d( sin(x+y+t), x=0..2*Pi, y=0..2*Pi, t=0..5,> frames=20 ):> g := animate3d( t, x=0..2*Pi, y=0..2*Pi, t=-1.5..1.5,> frames=20):> display( [f,g] );Placing Text in PlotsThe title and labels options to the plotting commands allow you toput titles and labels on your graphs. The textplot and textplot3d commandsgive more flexibility by allowing you to specify the exact positionsof the text. The plots package contains these two commands.> with(plots):You can use textplot and textplot3d as follows.textplot( [ x-coord, y-coord, "text" ] );textplot3d( [ x-coord, y-coord, z-coord, "text"] );For example,> a := plot( sin(x), x=-Pi..Pi ):> b := textplot( [ Pi/2, 1, "Local Maximum" ] ):> c := textplot( [ -Pi/2, -1, "Local Minimum" ] ):> display( [a,b,c] );1Local Maximum0.5–3 –2 –1 1 2 3x–0.5Local Minimum–1For details on controlling the placement of text, refer to ?plots,textplot.Use the font option to specify the font textplot and textplot3d use.In the following plot, the origin, a saddle point, is labelled P .> d := plot3d( x^2-y^2, x=-1..1, y=-1..1 ):> e := textplot3d( [0, 0, 0, "P"],> font=[HELVETICA, OBLIQUE, 22], color=white ):> display( [d,e], orientation=[68,45] );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!