Releases: cyberbit/plotter
Releases · cyberbit/plotter
v0.0.4
This release adds four new functions:
- Bounded lines: draws lines that are clipped to a bounding box within the plot area.
- Scaled lines: draws lines using scaled coordinates (source min/max to plot area min/max). A bounded variant is also available.
Plotter:drawLineBounded(x1, y1, x2, y2, color, boxminx, boxmaxx, boxminy, boxmaxy)
Plotter:drawLineSometimesBounded(x1, y1, x2, y2, color, onrate, offrate, oncount, offcount, boxminx, boxmaxx, boxminy, boxmaxy)
Plotter:scaleLine(x1, y1, x2, y2, minx, maxx, miny, maxy, color)
Plotter:scaleLineBounded(x1, y1, x2, y2, minx, maxx, miny, maxy, boxminx, boxmaxx, boxminy, boxmaxy, color)
v0.0.3
This release adds functions to plot XY points and grids scaled to the plot area. See src/examples/grid.lua
for a demo script.
At the moment, chartGrid
can accurately represent the relative movement of X and Y for chartLine
and chartGrid
and their variants. The Y spacing can scale automatically with the minimum and maximum data range, while the X spacing is at a fixed data interval.
Plotter:chartXY(data, minx, maxx, miny, maxy, color)
Plotter:chartGrid(dataw, miny, maxy, xOffset, color, styles)
v0.0.2
This release adds functions to plot lines and areas with auto-scaling X and Y coordinates, reducing the code required for fullscreen 1-D charts:
-- this:
plotter:chartLineAuto({1,3,5}, colors.white)
-- is equivalent to this:
plotter:chartLine({1,3,5}, 3, 1, 5, colors.white)
1-D Plotting
- Auto-scaling Lines
- Auto-scaling Areas