Graphics Previous page   Next Page

Plotting Only the Data Points

To plot a marker at each data point without connecting the markers with lines, use a specification that does not contain a line style. For example, given two vectors,

calling plot with only a color and marker specifier

plots a red plus sign at each data point.

The graph shows a plot of the expression e to the 2 cosine of x, where x is a vector ranging from 0 to 4 pi. The y-axis ranges from zero to 8 and the x-axis ranges from zero to 14. A red plus sign is displayed at each data point, but no line connects the markers.

See LineSpec for a list of available line styles, markers, and colors.


Previous page  Adding Plots to an Existing Graph Plotting Markers and Lines Next page

© 1994-2005 The MathWorks, Inc.