Package igraph :: Module drawing :: Class CoordinateSystem
[hide private]
[frames] | no frames]

Class CoordinateSystem

object --+
         |
        CoordinateSystem

Class implementing a coordinate system object.

Coordinate system objects are used when drawing plots which 2D or 3D coordinate system axes. This is an abstract class which must be extended in order to use it. In general, you'll only need the documentation of this class if you intend to implement an own coordinate system not present in igraph yet.

Instance Methods [hide private]
 
__init__(self, context, bbox)
Initializes the coordinate system.
 
local_to_context(self, *args)
Converts local coordinates to the context coordinate system (given by the bounding box).
 
plot(self)
Draws the coordinate system.

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, context, bbox)
(Constructor)

 

Initializes the coordinate system.

Parameters:
  • context - the context on which the coordinate system will be drawn.
  • bbox - the bounding box that will contain the coordinate system.
Overrides: object.__init__

local_to_context(self, *args)

 

Converts local coordinates to the context coordinate system (given by the bounding box).

This method must be overridden in derived classes.

plot(self)

 

Draws the coordinate system.

This method must be overridden in derived classes. Note that a coordinate system itself is not plottable (there is no __plot__ method), it must be initialized with respect to a Cairo drawing context and a bounding box before being plotted -- hence the different method name.