lecture15bw - LECTURE 15 2-dimensional plots: plot You have...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
LECTURE 15 Plotting 3-D plots E7, Fall 2008, Lecture 15 2-dimensional plots: plot You have already seen the command plot to make 2-d plots a = linspace(0,pi,80); b = sin(8*a); plot(a,b); % plot all points, connect with line l t (b ’’ ) lt d‘’ k t h it plot(a,b,’rx’) % plot red ‘x’ markers at each point plot(a,b,’rx’,a,b,’b-’) % red ‘x’, blue line plot(a,b,’go’,a,a.*b,’r--’,a,a.^2,’b’) % 3 plots ptional Optional formatting commands after (x,y) pairs Formatting: Colors, symbols and line types Color (Point) Marker LineStyle b blue . point - solid g green o circle : dotted r red x x-mark -. dashdot c cyan + plus -- dashed t* t ( ) l i m magenta * star (none) no line y yellow s square black d diamond k black d w white v triangle (down) ^ triangle (up) < triangle (left) > triangle (right) p pentagram h hexagram
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
hold, hold on, hold off ormally, each time lot executed, the current plot is Normally, each time plot is executed, the current plot is destroyed, and the new graph replaces it. Using the command >>hold on subsequent plots will simply add to whatever is already displayed. The command > old off >>hold off switches back to the “replace” mode. Using the command >>figure before calling next plot generates a new, separate graph. axis he xis ommand controls the limits (horizontal and vertical) The axis command controls the limits (horizontal and vertical) of the axes. Several uses are common (see >> help axis ) Direct specification of the limits axis([Xmin Xmax Ymin Ymax]) Retrieve the values (in a 1-by-4 array) of the limits V = axis Freeze limits at current values.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

lecture15bw - LECTURE 15 2-dimensional plots: plot You have...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online