Package joy :: Module scope :: Class LinePlotter
[hide private]
[frames] | no frames]

Class LinePlotter

source code


Concrete class LinePlotter implements simple line plotting functionality (including coordinate scaling and line markers) on a box within a pygame.Surface

Instance Methods [hide private]
 
__init__(self, surf, box=(0,0,1,1))
INPUTS: surf -- the pygame.Surface on which to plot box -- bounding box, in range (0,0) to (1,1)
source code
 
plot(self, x, y=None)
Plot a line with the specified points
source code
 
cla(self)
Clear the plot area to background color
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  color = np.array([0, 0, 255])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, surf, box=(0,0,1,1))
(Constructor)

source code 

INPUTS:
  surf -- the pygame.Surface on which to plot
  box -- bounding box, in range (0,0) to (1,1)
  
ATTRIBUTES (public):
  .c -- color -- line color to use; autogenerated
  .mrk -- Glyph -- line symbols; default is dot with the color .c
  .bg -- color -- background color used for clearing plot area
  .axes -- 4-list -- (xmin,ymin,width,height)

Overrides: object.__init__

plot(self, x, y=None)

source code 

Plot a line with the specified points

INPUTS:
  x -- numbers -- x coordinates, in plot(x,y) form, or y coordinates
    in plot(y) form.
  y -- numbers or None -- y coordinates of points