scatter

Matlab Functions List


!! 例子请见 Matlab Graphics - Scatter Plots

  • scatter(x,y,<sz>,<c>) creates a scatter plot with circles at the locations specified by the vectors x and y, in the size and color specified by sz and c
    • Size:
      • To plot each circle with equal size, specify sz as a scalar
      • To plot each circle with a different size, specify sz as a vector with length equal to the length of x and y
    • Color:
      • To plot all circles with the same color, specify c as a color name or an RGB triplet
      • To use varying color, specify c as a vector or a three-column matrix of RGB triplets
  • scatter(___,'filled') fills in the circles
  • scatter(___,mkr) specifies the marker type
  • scatter(___,Name,Value) modifies the scatter chart using one or more name-value pair arguments
  • scatter(ax,___) plots into the axes specified by ax instead of into the current axes
  • s = scatter(___) returns the Scatter object