ENGR 101 Lecture Notes - Lecture 8: Scatter Plot, Pie Chart, Bar Chart
Document Summary
Takes in two arguments, vectors that are interpreted as coordinates of ordered pairs to be plotted. Connects the data points, so x values need to be in increasing order. X = 0:0. 1:10; plot(x, sin(x), x, cos(x), x, cos(x. ^2)); Provides an alternate way to create evenly spaced vectors of numbers (old way)range notation: (start, stepsize, end) Used to display graphics in a separate window. Each figure has a unique number (figure 1, figure 2) figure() creates a figure that becomes the current figure figure(n) sets figure n to be the current figure (created if it doesn"t exist already) To close a particular figure close n; Use the pie function to create 1d, use the pie3 function for 3d. Names are in curly brackets and single quotes. Adding axis labels xlabel( eng 100 projects"); ylabel( project score (%)"); Southwest specifies the location of the legend box.