Navigation

Operators and Keywords

Function List:

C++ API

Function File: plotdecimate (P)

Function File: plotdecimate (P, so)

Function File: plotdecimate (P, so, res)

Optimise plot data by removing redundant points and segments

The first parameter P is a two-column matrix to be plotted as X and Y coordinates. The second optional argument so disables segment optimisation when set to false (default is true). The third optional argument res is the size of the largest error on the plot: if it is a scalar, it is meant relative to the range of X and Y values (default 1e-3); if it is a 2x1 array, it contains the absolute errors for X and Y. Returns a two-column matrix containing a subset of the rows of P. A line plot of P has the same appearance as a line plot of the output, with errors smaller than res. When creating point plots, set so to false.