Skip to content

Releases: cyberbit/plotter

v0.0.4

17 Mar 05:12
Compare
Choose a tag to compare

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

23 Dec 20:27
Compare
Choose a tag to compare

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)

Plotting sum of math.random(-90,100):
2023-12-23_14 05 54

Plotting math.tan:
2023-12-23_14 13 56

v0.0.2

07 Dec 03:57
Compare
Choose a tag to compare

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

v0.0.1

04 Dec 00:48
Compare
Choose a tag to compare

🎉 Initial release

Drawing

  • Lines (optional dot/dash patterns)
  • Boxes (optional dot/dash patterns)
  • Filled boxes

1-D Plotting (index = X, value = Y)

  • Lines
  • Areas