Graphics    

Discrete Data Graphs

MATLAB has a number of specialized functions that are appropriate for displaying discrete data. This section describes how to use stem plots and stairstep plots to display this type of data. (Bar charts, discussed earlier in this section, are also suitable for displaying discrete data.)

Discrete Data Plotting Commands
Function
Description

stem

Displays a discrete sequence of y-data as stems from x-axis

stem3

Displays a discrete sequence of z-data as stems from xy-plane

stairs

Displays a discrete sequence of y-data as steps from x-axis


 Specifying Number of Bins Two-Dimensional Stem Plots