Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
Graphic area for displaying curves #. More...
Public Member Functions | |
def | __init__ (self, image=None, width=556, height=390, EventInterpreter=None, zoom=1) |
Calls Draw_Area constructor and sets margins. More... | |
def | grid (self) |
Drawing a grid with axes and legend More... | |
def | plot (self, Curve_id, newpoint, Width=3) |
A version of PLOT that checks whether the new segment remains within the frame. More... | |
Public Member Functions inherited from Evolife.Graphics.Plot_Area.Draw_Area | |
def | __init__ (self, image=None, width=400, height=400, EventInterpreter=None, zoom=1) |
Calls Image_Area constructor Initializes Curves. More... | |
def | set_margins (self, Left, Right, Bottom, Top) |
surrounding margins (in Image_Area pixels) More... | |
def | init_Pens (self) |
Defining one pen and one QPainterPath per curve. More... | |
def | grid (self) |
Initial display - to be overloaded. More... | |
def | pixel2xy (self, Point) |
converts physical coordinates into logical pixel(between 0 and scaleX) More... | |
def | xy2pixel (self, Point) |
converts logical pixel (between 0 and scaleX) into physical coordinates through rescaling More... | |
def | convert (self, Point) |
Conversion of logical coordinates into physical coordinates through scaling and margin translation. More... | |
def | Q_Convert (self, Point) |
Conversion of Point into Qt point. More... | |
def | draw (self, oldpoint, newpoint, Width=3, ColorID=0, Tag='') |
adds a segment on a given curve More... | |
def | drawTo (self, newpoint, Width=3, ColorID=0, Drawing=True, Tag='') |
draws an additional segment on a given curve (from the end of the previous one) More... | |
def | erase (self) |
erase curves, items and restore grid More... | |
def | redraw (self) |
the whole picture is redrawn when the scale changes More... | |
def | reframe (self, Point, Anticipation=False) |
performs a change of scale when necessary More... | |
def | plot (self, Curve_designation, newpoint, Width=3) |
draws an additional segment on a curve More... | |
def | move (self, Curve_designation, newpoint) |
introduces a discontinuity in a curve More... | |
Public Member Functions inherited from Evolife.Graphics.Plot_Area.Image_Area | |
def | __init__ (self, image=None, width=1000, height=1000, EventInterpreter=None, zoom=1) |
Inherits from QGraphicsScene. More... | |
def | resize (self, w, h) |
Stores new dimensions and redraws. More... | |
def | dimension () |
returns dimensions More... | |
def | redraw (self) |
the whole scene is redrawn when the scale changes More... | |
def | drawPoints (self) |
Unused ---— just for test. More... | |
Public Member Functions inherited from Evolife.Graphics.Curves.Curves | |
def | __init__ (self) |
Creates a list of curves matching all available Evolife colours. More... | |
def | start_Curve (self, Curve_id, location) |
defines where a curve should start More... | |
def | CurveAddPoint (self, Curve_id, Point, Draw=True) |
Adds a point to a Curve. More... | |
def | Curvenames (self, Names) |
records names for Curves. More... | |
def | ActiveCurves (self) |
returns actually used curves More... | |
def | Legend (self) |
returns tuples (ID, colour, colourname, curvename, legend) representing active curves More... | |
def | dump (self, ResultFileName=None, ResultHeader='', DumpStart=0) |
Saves Curves to a file. More... | |
Additional Inherited Members | |
Public Attributes inherited from Evolife.Graphics.Plot_Area.Draw_Area | |
OrigineX | |
OrigineY | |
scaleX | |
scaleY | |
LeftMargin | |
RightMargin | |
BottomMargin | |
TopMargin | |
Pens | |
change | |
Public Attributes inherited from Evolife.Graphics.Plot_Area.Image_Area | |
ScaledBoard | |
Board | |
fitSize | |
Canvas | |
W | |
H | |
FrameNumber | |
EventInterpreter | |
zoom | |
Public Attributes inherited from Evolife.Graphics.Curves.Curves | |
Colours | |
Curves | |
UsedCurves | |
Graphic area for displaying curves #.
Definition of the drawing area, with grid, legend and curves
Definition at line 384 of file Plot_Area.py.
def Evolife.Graphics.Plot_Area.Plot_Area.__init__ | ( | self, | |
image = None , |
|||
width = 556 , |
|||
height = 390 , |
|||
EventInterpreter = None , |
|||
zoom = 1 |
|||
) |
Calls Draw_Area constructor and sets margins.
Reimplemented from Evolife.Graphics.Plot_Area.Draw_Area.
Definition at line 387 of file Plot_Area.py.
def Evolife.Graphics.Plot_Area.Plot_Area.grid | ( | self | ) |
Drawing a grid with axes and legend
Reimplemented from Evolife.Graphics.Plot_Area.Draw_Area.
Definition at line 395 of file Plot_Area.py.
def Evolife.Graphics.Plot_Area.Plot_Area.plot | ( | self, | |
Curve_id, | |||
newpoint, | |||
Width = 3 |
|||
) |
A version of PLOT that checks whether the new segment remains within the frame.
If not, the scale is changed and all curves are replotted
Reimplemented from Evolife.Graphics.Plot_Area.Draw_Area.
Definition at line 438 of file Plot_Area.py.