Skip to content

pyglplot.roll

Class to plot a rolling graph

Parameters:

Name Type Description Default
roll_buffer_size

number of points to plot

100
num_lines

number of lines to plot

1
width

window width

1280
height

window height

800
title

window title

'pyglplot'
context_api

OpenGL windowing method: "native", "egl", "osmesa", or "auto"

'native'

add_point(y)

Add a point to the plot

Parameters:

Name Type Description Default
y

y value to plot

required

run(update_function)

Run the plot

Parameters:

Name Type Description Default
update_function

function to call to update the plot

required

update_line_color(index_line, color)

Update the color of a line

Parameters:

Name Type Description Default
index_line

index of the line to update

required
color np.ndarray

numpy array of 3 uint8 values (RGB) between 0 and 255 e.g.

required