plot

Parent Previous Next

plot

y = plot ( x,y[=""],opt[=""] )
y = plot ( handle,x,y[=""],opt[=""] )
y = handle.plot ( x,y[=""],opt[=""] )

Plot the data

arg

type

Description

Unit or Value scale

handle

HGO

handle to the figure window or the axes


x

VECT or AUD

x-data


y

VECT or AUD

y-data


opt

TXT

plot option string--specifying color marker and line style (see notes)


Outputs

  • y is the handle to the line object

Notes

  • If handle is omitted, this function creates a new figure window and plots
  • If y is specified, y is plotted as a function of x.
  • If y is omitted, x is plotted with the index (if non-audio) or the time (if audio) on the x-axis.
  • opt is a text not exceeding 4 characters specifying the color, the marker type and the line style.
    Color: r(ed) g(reen) b(lue) y(ellow) c(yan) m(agenta) h(white) (blac)k
    Marker: o circle s square . point * asterisk x cross + plussign d diamond ^ upward-pointingtriangle v downward-pointingtriangle > right-pointingtriangle < left-pointingtriangle
    Linestyle: - solid : dotted -- dashed -. dash-dot
  • The default marker type is . (point)
  • The default line style is solid, but if only the marker type is specified, the line style will become none (i.e., in order to make the line tyle none, specify ".")
  • The default color is blue
  • All the other graphic properties can be directly manipulated with the relevant member variables.

Examples

  • plot(x) // plot x with the default parameters
  • plot(x,y) // plot y as a function of x with the default parameters
  • plot(x,"r") // plot x with the red line
  • plot(x,"o") // plot x with the marker "o" and no line
  • plot(x,"*":) // plot x with the marker "*" and dotted line
  • plot(x,y,"o") // plot y as a function of x with the marker "o" and no line
  • plot(x,y,"*:") // plot y as a function of x with the marker "*" and dotted line
  • plot(h,x) // plot x in h (either a figure window handle or axes handle)
  • plot(h,x,y)
  • plot(h,x,y,"r")

See Also

figure | axes | text | delete | line

Created with the Personal Edition of HelpNDoc: Free Kindle producer