phystricks
Public Member Functions | Public Attributes | Private Member Functions | List of all members
phystricks.src.GridGraph.GridGraph Class Reference
Inheritance diagram for phystricks.src.GridGraph.GridGraph:
Inheritance graph
[legend]
Collaboration diagram for phystricks.src.GridGraph.GridGraph:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, bb=None)
 
def add_option (self, opt)
 
def optionsTrace (self)
 
def optionsParams (self)
 
def action_on_pspict (self, pspict)
 

Public Attributes

 BB
 
 separator_name
 
 Dx
 
 Dy
 
 num_subX
 
 num_subY
 
 draw_border
 
 draw_horizontal_grid
 
 draw_vertical_grid
 
 main_horizontal
 
 main_vertical
 
 sub_vertical
 
 sub_horizontal
 
 border
 

Private Member Functions

def _bounding_box (self, pspict=None)
 
def _math_bounding_box (self, pspict=None)
 

Detailed Description

A grid. This is main lines to appear at regular interval on the picture.

ATTRIBUTES:

- ``self.BB`` - the bounding box of the grid : its size.

- ``self.Dx,self.Dy`` - the step of main subdivision along `X` and `Y` directions (have to be integers).

- ``self.num_subX,self.num_subY`` - number of subdivision within each main subdivision of length Dx or Dy. When it is zero, there are no subdivisions.

It draws lines on the integer multiples of `Dx`. It begins at the closest integer multiple of `Dx` from the lower left corner.
It finishes before to reach the upper right corner if `Dx` the size.
Subdivisions are drawn following the same rule.

- ``self.draw_border`` - (default=False) If True, the border is drawn even if it does not  arrives on an integer multiple of Dx.
                                    It turns out that for aestetical reasons, this is a bad idea to turn it True.


- ``self.main_horizontal`` : an objet of type :class:`SegmentGraph`. This is the archetype of the horizontal lines
                             of the main grid will be drawn.

As an example, in order to have red main horizontal lines::

    sage: from phystricks import *
    sage: grid=Grid()
    sage: grid.main_horizontal.parameters.color = "red"

Constructor & Destructor Documentation

def phystricks.src.GridGraph.GridGraph.__init__ (   self,
  bb = None 
)

Member Function Documentation

def phystricks.src.GridGraph.GridGraph._bounding_box (   self,
  pspict = None 
)
private
def phystricks.src.GridGraph.GridGraph._math_bounding_box (   self,
  pspict = None 
)
private
def phystricks.src.GridGraph.GridGraph.action_on_pspict (   self,
  pspict 
)
def phystricks.src.GridGraph.GridGraph.add_option (   self,
  opt 
)
def phystricks.src.GridGraph.GridGraph.optionsParams (   self)
def phystricks.src.GridGraph.GridGraph.optionsTrace (   self)

Member Data Documentation

phystricks.src.GridGraph.GridGraph.BB
phystricks.src.GridGraph.GridGraph.border
phystricks.src.GridGraph.GridGraph.draw_border
phystricks.src.GridGraph.GridGraph.draw_horizontal_grid
phystricks.src.GridGraph.GridGraph.draw_vertical_grid
phystricks.src.GridGraph.GridGraph.Dx
phystricks.src.GridGraph.GridGraph.Dy
phystricks.src.GridGraph.GridGraph.main_horizontal
phystricks.src.GridGraph.GridGraph.main_vertical
phystricks.src.GridGraph.GridGraph.num_subX
phystricks.src.GridGraph.GridGraph.num_subY
phystricks.src.GridGraph.GridGraph.separator_name
phystricks.src.GridGraph.GridGraph.sub_horizontal
phystricks.src.GridGraph.GridGraph.sub_vertical

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