Graphics    

Basic Plotting Commands

MATLAB provides a variety of functions for displaying vector data as line plots, as well as functions for annotating and printing these graphs. The following table summarizes the functions that produce basic line plots. These functions differ in the way they scale the plot's axes. Each accepts input in the form of vectors or matrices and automatically scales the axes to accommodate the data.

Function
Description
plot
Graph 2-D data with linear scales for both axes
plot3
Graph 3-D data with linear scales for both axes
loglog
Graph with logarithmic scales for both axes
semilogx
Graph with a logarithmic scale for the x-axis and a linear scale for the y-axis
semilogy
Graph with a logarithmic scale for the y-axis and a linear scale for the x-axis
plotyy
Graph with y-tick labels on the left and right side


  Basic Plotting Creating Line Plots