Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Classes | Functions | Variables
Evolife.Graphics.Plot_Area Namespace Reference

Windows that display Curves or images. More...

Classes

class  Draw_Area
 Draw_Area: Basic drawing Area. More...
 
class  Ground
 Defines a 2-D region where agents are located and may move. More...
 
class  Image_Area
 Basic graphic area type #. More...
 
class  Plot_Area
 Graphic area for displaying curves #. More...
 

Functions

def speck (self, Curve_id, newpoint, Size=3)
 draws a spot More...
 
def mouseLocate (self, MouseEvent)
 convert mouse position into window coordinates More...
 
def mousePressEvent (self, MouseEvent)
 retrieves mouse clicks - added by Gauthier Tallec More...
 
def mouseReleaseEvent (self, MouseEvent)
 retrieves mouse clicks More...
 
def mouseDoubleClickEvent (self, MouseEvent)
 retrieves mouse clicks More...
 
def mouseMoveEvent (self, MouseEvent)
 retrieves mouse movements when button is pressed More...
 

Variables

 QString = lambda x: x
 
 ZoomL = lambda *L: map(lambda x: int(x * L[0]), L[1:])
 
 Curve_id
 self.drawTo(newpoint, Curve_id, Drawing=False) More...
 
 newpoint
 
 Draw
 

Detailed Description

Windows that display Curves or images.

This module can be used independently.

Useful classes are:
- Image_Area:   An area that displays an image
    function:   display(<bitmap>)
- Draw_Area:    Basic drawing Area
    function:   plot(<plot_number>, (<x>, <y>) )
- Plot_Area:    Draw_Area + grid + automatic resizing
    function:   plot(<plot_number>, (<x>, <y>) )
- Ground:      Defines a 2-D region where agents are located and may move
    functions:  create_agent(<name>, <colour_number>, (<x>, <y>) )
                move_agent(<name>, (<Newx>, <Newy>) )

Usage:
    #self.W = QPlot_Area.AreaView(QPlot_Area.Image_Area)
    self.W = QPlot_Area.AreaView(QPlot_Area.Draw_Area)
    #self.W = QPlot_Area.AreaView(QPlot_Area.Plot_Area)
    self.W.Area.plot(3,(10,10))
    self.W.Area.plot(3,(20,40))
    self.W.Area.plot(3,(10,22))

Function Documentation

◆ mouseDoubleClickEvent()

def Evolife.Graphics.Plot_Area.mouseDoubleClickEvent (   self,
  MouseEvent 
)

retrieves mouse clicks

Definition at line 364 of file Plot_Area.py.

◆ mouseLocate()

def Evolife.Graphics.Plot_Area.mouseLocate (   self,
  MouseEvent 
)

convert mouse position into window coordinates

Definition at line 340 of file Plot_Area.py.

◆ mouseMoveEvent()

def Evolife.Graphics.Plot_Area.mouseMoveEvent (   self,
  MouseEvent 
)

retrieves mouse movements when button is pressed

Definition at line 371 of file Plot_Area.py.

◆ mousePressEvent()

def Evolife.Graphics.Plot_Area.mousePressEvent (   self,
  MouseEvent 
)

retrieves mouse clicks - added by Gauthier Tallec

Definition at line 350 of file Plot_Area.py.

◆ mouseReleaseEvent()

def Evolife.Graphics.Plot_Area.mouseReleaseEvent (   self,
  MouseEvent 
)

retrieves mouse clicks

Definition at line 357 of file Plot_Area.py.

◆ speck()

def Evolife.Graphics.Plot_Area.speck (   self,
  Curve_id,
  newpoint,
  Size = 3 
)

draws a spot

Definition at line 332 of file Plot_Area.py.

Variable Documentation

◆ Curve_id

Evolife.Graphics.Plot_Area.Curve_id

self.drawTo(newpoint, Curve_id, Drawing=False)

Definition at line 328 of file Plot_Area.py.

◆ Draw

Evolife.Graphics.Plot_Area.Draw

Definition at line 328 of file Plot_Area.py.

◆ newpoint

Evolife.Graphics.Plot_Area.newpoint

Definition at line 328 of file Plot_Area.py.

◆ QString

Evolife.Graphics.Plot_Area.QString = lambda x: x

Definition at line 54 of file Plot_Area.py.

◆ ZoomL

Evolife.Graphics.Plot_Area.ZoomL = lambda *L: map(lambda x: int(x * L[0]), L[1:])

Definition at line 69 of file Plot_Area.py.