Package sabx10 :: Package profiles :: Module plotter
[hide private]
[frames] | no frames]

Module plotter

source code

Handle the plotting of profile data and saving the profile to a file.

Classes [hide private]
  ProfilePlotter
Generates a profile file.
Functions [hide private]
(float,float), (float,float), string
_poly_gen(distances, elevations)
Generator to provide the plot fill data for a graph based on a list of distances (X axis) and elevations (Y axis).
source code
Variables [hide private]
  __package__ = 'sabx10.profiles'
Function Details [hide private]

_poly_gen(distances, elevations)

source code 

Generator to provide the plot fill data for a graph based on a list of distances (X axis) and elevations (Y axis). Fill data is a grade-dependant color and x and y co-ordinates needed to specify a polygon on the graph so it can be filled in with the proper color.

Parameters:
  • distances (list of float) - list of distances for points in segment being plotted
  • elevations (list of float) - list of elevations for point in segment being plotted
Returns: (float,float), (float,float), string
(x1, x2), (y1, y2), color