Skip to content

DataLogger and DataStreamer: new plot types #2377

@swharden

Description

@swharden

This is a recurring problem and it would be nice if there were a simpler way to solve it.

Consider a situation where you have incoming sensor data you wish to plot in real time:

  • Multi-channel readings
  • Hundreds or thousands of readings per second
  • Readings stream in faster than we need to update the plot
  • The plotted data grows infinitely (and data structure should expand as needed)
  • Autoscaling should be smart (don't traverse all the data to rescale on every redraw)

This is hard because (1) signal plots cannot easily grow and (2) automatic axis scaling is not currently optimized for grow-only data.

Demo

I created a fake data generator and added a demo WinForms app that tries to accomplish this goal using signal plots, but since signal plots can't change the length of their data arrays the plot has to be cleared and signals re-added on every frame redraw. This is a poor design, but I hope that a new plot type can make this better.

https://github.com/ScottPlot/ScottPlot/blob/98744cf82ce915b8aca8bd4a4d244d38553dddcc/src/ScottPlot4/ScottPlot.Demo/ScottPlot.Demo.WinForms/WinFormsDemos/DataLogger.cs

data-logger

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions