Plot-ho-matic-0.5.0.3: Real-time line plotter for protobuf-like data

Safe HaskellNone
LanguageHaskell2010

PlotHo

Contents

Synopsis

Documentation

data Plotter a Source

add channels to this, then run it with runPlotter

runPlotter :: Plotter () -> IO () Source

fire up the the GUI

data XAxisType Source

Constructors

XAxisTime

time since the first message

XAxisTime0

time since the first message, normalized to 0 (to reduce plot jitter)

XAxisCount

message index

XAxisCount0

message index, normalized to 0 (to reduce plot jitter)

addHistoryChannel Source

Arguments

:: Lookup a 
=> String

channel name

-> XAxisType

what to use for the X axis

-> ((a -> Bool -> IO ()) -> IO ())

worker which is passed a "new message" function, this will be forked with forkIO

-> Plotter () 

Simplified time-series channel which passes a "send message" function to a worker and forks it using forkIO. The plotter will plot a time series of messages sent by the worker. The worker should pass True to reset the message history, so sending True the first message and False subsequent messages is a good starting place.

addChannel Source

Arguments

:: String

channel name

-> (a -> a -> Bool)

Is the signal tree the same? This is used for instance if signals have changed and the plotter needs to rebuild the signal tree. This lets you keep the plotter running and change other programs which send messages to the plotter.

-> (a -> [Tree (String, String, Maybe (a -> [[(Double, Double)]]))])

how to build the signal tree

-> ((a -> IO ()) -> IO ())

worker which is passed a "new message" function, this will be forked with forkIO

-> Plotter () 

This is the general interface to plot whatever you want. Use this when you want to give the whole time series in one go, rather than one at a time such as with addHistoryChannel. Using types or data, you must encode the signal tree with the message so that the plotter can build you the nice message toggle tree.

re-exported for convenience