gtfspy/routing/node_profile_analyzer_time_and_veh_legs.py
def _truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100):
    """
    Truncates a colormap to use.
    Code originall from http://stackoverflow.com/questions/18926031/how-to-extract-a-subset-of-a-colormap-as-a-new-colormap-in-matplotlib
    """
    new_cmap = LinearSegmentedColormap.from_list(
        'trunc({n},{a:.2f},{b:.2f})'.format(n=cmap.name, a=minval, b=maxval),
        cmap(numpy.linspace(minval, maxval, n))
    )
    return new_cmap
def _truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100):
    """
    Truncates a colormap to use.
    Code originall from http://stackoverflow.com/questions/18926031/how-to-extract-a-subset-of-a-colormap-as-a-new-colormap-in-matplotlib
    """
    new_cmap = LinearSegmentedColormap.from_list(
        'trunc({n},{a:.2f},{b:.2f})'.format(n=cmap.name, a=minval, b=maxval),
        cmap(numpy.linspace(minval, maxval, n))
    )
    return new_cmap
def _truncate_colormap ( cmap , minval = 0.0 , maxval = 1.0 , n = 100 ) : new_cmap = LinearSegmentedColormap . from_list ( 'trunc({n},{a:.2f},{b:.2f})' . format ( n = cmap . name , a = minval , b = maxval ) , cmap ( numpy . linspace ( minval , maxval , n ) ) ) return new_cmap
Truncates a colormap to use.
    Code originall from http://stackoverflow.com/questions/18926031/how-to-extract-a-subset-of-a-colormap-as-a-new-colormap-in-matplotlib
Truncates a colormap to use . Code originall from http : // stackoverflow . com / questions / 18926031 / how - to - extract - a - subset - of - a - colormap - as - a - new - colormap - in - matplotlib