NAME
GIFgraph::EvenlySpaced - spaces the data points evenly
DESCRIPTION
This module wraps a GIFgraph object so that the data points become numericaly spaced (aproximately).
SYNOPSIS
Wrapps a GIFgraph object (probably a GIFgraph::lines) so that the x values are spaced numericaly. Use exactly as your GIFgraph object. Due to a problem I had with AUTOLOAD, it must be the outer wrapper class.
Use
$graph = new GIFgraph::lines(400,300);
$es = new GIFgraph::EvenlySpaced($graph);
or
$graph = new GIFgraph::lines(400,300);
$withmap = new GIFgraph::WithMap($graph);
$es = new GIFgraph::EvenlySpaced($withmap);
or even
$es = new GIFgraph::EvenlySpaced(new GIFgraph::WithMap(new GIFgraph::lines(400,300)));
etc. etc. etc.
Functions
- new
-
Returns a new GIFgraph::EvenlySpaced object
$es = new GIFgraph::EvenlySpaced($parentGraph);
where $parentGraph is any object that behaves like a GIFgraph::lines type object such as a GIFgraph::WithMap.
- plot
-
This function is overridden to space the data numericaly along the x-axis.
Fields
- fudge
-
This is a fudge factor used in checking whether one number roughly devides into another. It defaults to 0.1 but if it is obviously doing silly things then change it. Good luck - I don't realy know how it works.
Guts
This module uses MRP::BaseClass to implement member access functions.
To make the 'parent' object behave as if it the super class I have done some magic with AUTOLOAD. This has produced the restriction that you can not wrap an EvenlySpaced object inside another - such as WithMap - that also uses magic.
@ISA does not include the parent type as it is not known. The isa() method is overridden to account for this.
AUTHOR
Matthew Pocock mrp@sanger.ac.uk