Plots Flashcards
xlabel(‘string’)
Labels the x-axis
plotonepoint(x, y, ‘format’)
Plots one point at (x,y) with the format
ylabel(‘string’)
Labels the y-axis
title(‘string’)
Gives the plot a title
plot(x, y, ‘format’)
Plots points on a graph
axis([xmin xmax ymin ymax])
Set the axes
Plot customization:
b blue m magenta
c cyan r red
g green w white
k black y yellow
Plot markers:
o circle * star v down triangle
d diamond s square < left triangle
p pentagon x x-mark > right triangle
+ plus . point ^ up triangle
Plot Line Types:
– dashed
-. dash dot
: dotted
- solid
Default is solid line
clf
Clears figure window
figure
figure(n)
Creates a new empty figure
figure(n) is a way of labeling multiple figures
hold
hold on
hold off
hold is a toggle that enables overlaying figures on one graph
grid
grid on
grid off
Grid is a toggle that displays graph grid lines
legend(‘string1’, ‘string2’, … )
Displays a legend identifying different figures on a plot
bar(x, y, ‘format’)
Creates a bar graph