Vaibhav Bajpai | Blog

Basic Graph Plots in MATLAB

14 November 2010

Plot x[1] v x[2]

plot(x(:,1), x(:,2)

Add legends for each plot

legend('foo' , 'bar', ...)

Set axis extremas

axis([Xmin, Xmax, Ymin, Ymax])

Label the axises

xlabel('foo')
ylabel('bar')

Add a title to the graph

title('foobar')
Fork me on GitHub