GlowBit.py
Public Member Functions | Public Attributes | List of all members
glowbit.glowbitMatrix.graph2D Class Reference

Object for drawing 2 dimensional time series graphs on GlowBit Matrix displays. More...

Inheritance diagram for glowbit.glowbitMatrix.graph2D:
Inheritance graph
[legend]
Collaboration diagram for glowbit.glowbitMatrix.graph2D:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, originX=0, originY=7, width=8, height=8, minValue=0, maxValue=255, colour=0xFFFFFF, bgColour=0x000000, colourMap="Solid", update=False, bars=False)
 Initialisation routine for the glowbit.matrix.graph2D object. More...
 
- Public Member Functions inherited from glowbit.colourFunctions
def wheel (self, pos)
 Converts an integer "colour wheel position" to a packed 32-bit RGB GlowBit colour value. More...
 
def rgbColour (self, r, g, b)
 Converts the r, g, and b integer arguments to a packed 32-bit RGB GlowBit colour value. More...
 
def glowbitColour2RGB (self, colour)
 Converts a 32-bit GlowBit colour value to an (R,G,B) tuple. More...
 
def red (self)
 Returns the GlowBit colour value for pure red.
 
def green (self)
 Returns the GlowBit colour value for pure green.
 
def blue (self)
 Returns the GlowBit colour value for pure blue.
 
def yellow (self)
 Returns the GlowBit colour value for yellow.
 
def purple (self)
 Returns the GlowBit colour value for purple.
 
def cyan (self)
 Returns the GlowBit colour value for cyan.
 
def white (self)
 Returns the GlowBit colour value for white.
 
def black (self)
 Returns the GlowBit colour value for black.
 
- Public Member Functions inherited from glowbit.colourMaps
def colourMapSolid (self, index, minIndex, maxIndex)
 Trivial colourmap method which always returns the colour in the parent object. More...
 
def colourMapRainbow (self, index, minIndex, maxIndex)
 Maps the pure hue colour wheel between minIndex and maxIndex. More...
 

Public Attributes

 minValue
 
 maxValue
 
 originX
 
 originY
 
 width
 
 height
 
 colour
 
 bgColour
 
 update
 
 m
 
 offset
 
 bars
 
 data
 
 colourMap
 

Detailed Description

Object for drawing 2 dimensional time series graphs on GlowBit Matrix displays.

Constructor & Destructor Documentation

◆ __init__()

def glowbit.glowbitMatrix.graph2D.__init__ (   self,
  originX = 0,
  originY = 7,
  width = 8,
  height = 8,
  minValue = 0,
  maxValue = 255,
  colour = 0xFFFFFF,
  bgColour = 0x000000,
  colourMap = "Solid",
  update = False,
  bars = False 
)

Initialisation routine for the glowbit.matrix.graph2D object.

A graph2D object will be drawn to a rectangular region specified by the origin, width, and height.

This graph type is explicitly designed to draw time series data.

Parameters
originXThe x coordinate of the graph's origin (lower left corner).
originYThe y coordinate of the graph's origin (lower left corner).
widthThe width, in pixels, of the graph's drawing area.
heightThe height, in pixels, of the graph's drawing area
minValueThe value which will be mapped to the bottom edge.
maxValueThe value which will be mapped to the upper edge.
colourA packed 32-bit GlowBit colour value. Used by the "Solid" colourmap, ignored by the "Rainbow" colourmap. Can also be accessed when writing custom colour map functions.
bgColourA packed 32-bit GlowBit colour value which is drawn to the entire graph area prior to drawing the data.
colourMapEither the string "Solid" or "Rainbow" or a pointer to a custom colour map function. Custom colour maps must take the parameters colourMap(self, index, minIndex, maxIndex).
updateIf update=True then a call to updateGraph2D() will, in turn, call glowbit.pixelsShow() to update the physical LEDs.

The documentation for this class was generated from the following file: