Plot/Data
< Plot
Jump to navigation
Jump to search
Plot | Verbs | Class Commands Data Options Outputs Types | Colors Fonts Keys Text YAxes | Function Multi Shape
Plot data may be given to the full-action plot command, or to the component sub-command pd, as either a numeric or a boxed array.
A numeric unboxed array should be a vector or matrix.
- For a plot requiring 2D data, a vector is the y values and a matrix is treated as rows of y values. The x axis defaults to i.{:$y
- For a plot requiring 3D data, the array should be a matrix and is treated as z values. The x axis defaults to i.# z and the y axis to i.{:$z
- Complex data is treated as x (real) and y (imaginary) values.
A boxed array is a list of either x;y, or r;theta, or x;y;z lists. The boxed values should conform to each other in size.
- For a plot requiring 2D data, the x values should have the same shape as the y values, or be a vector of length {:$y
- For a polar plot (2D only), data is r;theta, a 2-item list of boxed real-valued numerical lists. (Complex-valued data in polar format must first be separated into r-theta lists, which plot will then convert to x-y values.)
- For a plot requiring 3D data, the x and y values should have the same shape as the z values, or the x values should have length #z and the y values length {:$z
More than one set of data can be given.