ScatterView:
Filter:
MathLib/Classes (extension) | GUI > Accessories | Libraries > MathLib > ScatterViews

ScatterView
ExtensionExtension

Plot a collection of points in 2D

Description

Plot a collection of points in 2D

Part of MathLib, a diverse library of mathematical functions.

Class Methods

.new

Arguments:

parent

Parent view or window

bounds

The bounds, a Rect

data

An array of [[x0,y0], [x1,y1], ...[xN,yN]]

specX

ControlSpec with min/max of the plotted range of dimension X

specY

ControlSpec with min/max of the plotted range of dimension Y

Instance Methods

.data

Get or set data array.

Arguments:

data

An array of [[x0,y0], [x1,y1], ...[xN,yN]]

.refresh

Refresh the view. You will need to call this after making any changes to data or settings.

.drawMethod

Set the shape that will be drawn for each point.

Arguments:

method

One of: [\fillRect, \fillOval, \lineTo]

.symbolColor

Color of the shape plotted for each point

.isHighlight

Switch for highlight on/off

.highlightItem

Set item to be highlighted. Index could be either index or array of indices.

.highlightRange

Highlight multiple points

Arguments:

start

Integer index in data array

end

Integer index in data array

.highlightColor

Set color of highlighted item

.highlightSize

Set highlight extend

.background

set background-color

Examples

Authors

Till Bovermann, 2005.