A plot trace is a set of (x, y) points associated with an
x and y axis.
The trace and can be drawn with either a set of
markers at each point, or a line between each pair of adjacent points.
The axes are used to plot the trace - the trace
can only appear within the bounds of the axes, and the axes
provide the mapping from axis value to draw space so the trace
can be drawn. Points that lie outside the axis will not be draw,
and lines between pairs of points where one is outside will be interpolated.
While FigureOne isn't designed to process very large numbers of points,
some steps can be taken to improve performance when large numbers of points
are being used (tens of thousands or more):
Turn off corner interpolation between line segments in line:
{ line: { corner: 'none } }`
Use xSampleDistance and ySampleDistance to not draw points that are
too close to each other
If using markers, use polygons with smaller numbers of sides, and use fills
instead of outlines
Even using these methods, it can take up to a second to render a trace with
hundreds of thousands of points (depending on the client device).
xAxisstring | COL_Axis — The x axis associated with the trace,
if this is a string, the trace must be part of a plot with an axis with the
same name. In plots, this will default to the string 'x'.
yAxisstring | COL_Axis — The y axis associated with the trace,
if this is a string, the trace must be part of a plot with an axis with the
same name. In plots, this will default to the string 'y'.
lineOBJ_LineStyleSimple — line style of the trace - if neither line nor
markers is defined, then line will default to a solid line. If line
is not defined, but markers is, then only markers will be used to represent
the line
namestring — name of the trace used in plot legends
xSampleDistancenumber — If x distance between points is less
than this value, then the later point will not be plotted. By default this is
1/4000th the range of the x axis
ySampleDistancenumber — If y distance between points is less
than this value, then the later point will not be plotted. By default this is
1/4000th the range of the y axis
CollectionsTrace options object that extends OBJ_Collection options object (without
parent).A plot trace is a set of (x, y) points associated with an x and y axis.
The trace and can be drawn with either a set of
markersat each point, or alinebetween each pair of adjacent points.The axes are used to plot the trace - the trace can only appear within the bounds of the axes, and the axes provide the mapping from axis value to draw space so the trace can be drawn. Points that lie outside the axis will not be draw, and lines between pairs of points where one is outside will be interpolated.
While FigureOne isn't designed to process very large numbers of points, some steps can be taken to improve performance when large numbers of points are being used (tens of thousands or more):
line:{ line: { corner: 'none} }`xSampleDistanceandySampleDistanceto not draw points that are too close to each otherEven using these methods, it can take up to a second to render a trace with hundreds of thousands of points (depending on the client device).
pointsTypeParsablePoint[] — the x points of the tracexAxisstring| COL_Axis — The x axis associated with the trace, if this is a string, the trace must be part of a plot with an axis with the same name. In plots, this will default to the string'x'.yAxisstring| COL_Axis — The y axis associated with the trace, if this is a string, the trace must be part of a plot with an axis with the same name. In plots, this will default to the string'y'.lineOBJ_LineStyleSimple — line style of the trace - if neitherlinenormarkersis defined, thenlinewill default to a solid line. Iflineis not defined, butmarkersis, then only markers will be used to represent the linemarkersOBJ_Polygon | OBJ_Star — marker style of the tracecolorTypeColor — color of the tracenamestring— name of the trace used in plot legendsxSampleDistancenumber— If x distance between points is less than this value, then the later point will not be plotted. By default this is 1/4000th the range of the x axisySampleDistancenumber— If y distance between points is less than this value, then the later point will not be plotted. By default this is 1/4000th the range of the y axisSee
For more examples on using traces, see CollectionsPlot
To test examples below, append them to the boilerplate.