Skip to content

pyglplot.scatter

Scatter plot class

Parameters:

Name Type Description Default
max_square_num

Maximum number of squares to be drawn, defaults to 100

100
square_size

Size of the square, defaults to 0.1

0.1
width

Width of the window, defaults to 1280

1280
height

Height of the window, defaults to 800

800
title

Title of the window, defaults to "pyglplot"

'pyglplot'
context_api

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

'native'

add_point(pos)

Add a point to the plot.

Parameters:

Name Type Description Default
pos np.ndarray

The position of the point to add.

required

Returns:

Type Description
None

None

add_pos_and_color(pos, color)

Add a point and its color to the plot.

Parameters:

Name Type Description Default
pos np.ndarray

The position of the point to add.

required
color np.ndarray

The color of the point to add.

required

Returns:

Type Description
None

None

reset_color()

Reset the colors of all points to zero.

Returns:

Type Description
None

None

reset_pos()

Reset the positions of all points to zero.

Returns:

Type Description
None

None

run(update_function=_update_empty)

Run the plot.

Parameters:

Name Type Description Default
update_function

The function to call to update the plot.

_update_empty

Returns:

Type Description
None

None