Module Expr Str Import alias Import alias ClassDef bases body Expr Str Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num body Expr Str Assign NameStore Call NameLoad If UnaryOpNot NameLoad body Assign NameStore ListLoad If UnaryOpNot NameLoad body Assign NameStore ListLoad If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpMod Str TupleLoad BinOpAdd BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num BinOpAdd AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpMod Str TupleLoad Num Num BinOpAdd AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareGt NameLoad Num body Assign NameStore ListComp BinOpDiv Call NameLoad BinOpMult NameLoad BinOpSub AttributeLoad NameLoad attr Num NameLoad comprehension NameStore NameLoad Assign NameStore BinOpAdd ListLoad Num ListComp Call NameLoad BinOpAdd NameLoad Call NameLoad SubscriptLoad NameLoad Slice Num NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad orelse Assign NameStore ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpSub NameLoad NameLoad If CompareLt NameLoad Num body Assign NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list If UnaryOpNot NameLoad body Return ListLoad If CompareLtLt Num NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore ListComp Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Print NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore ListLoad If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body If UnaryOpNot NameLoad body If CompareNotIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpAdd BinOpMult Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpDiv Num Call NameLoad NameLoad Num Assign NameStore BinOpMod Str SubscriptLoad Call NameLoad NameLoad Slice Num Num orelse Assign NameStore NameLoad Assign NameStore ListLoad Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num For TupleStore NameStore NameStore Call NameLoad NameLoad body If BoolOpAnd CompareGt NameLoad Num UnaryOpNot NameLoad body Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Continue Assign NameStore BinOpSub Call NameLoad BinOpMult BinOpDiv NameLoad Num AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpSub Call NameLoad BinOpMult BinOpDiv NameLoad Num AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad BinOpAdd NameLoad Num Call NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad BinOpAdd NameLoad Num Call NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad Num Expr Call AttributeLoad NameLoad attr Str Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad ListComp Call NameLoad Call AttributeLoad NameLoad attr comprehension NameStore NameLoad Return BinOpMult ListLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Num BinOpAdd BinOpAdd Num NameLoad Num BinOpAdd AttributeLoad NameLoad attr Num BinOpAdd BinOpAdd Num NameLoad Num Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore Call NameLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareEq BinOpMod NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpAdd BinOpAdd NameLoad Num Num Num BinOpAdd BinOpAdd NameLoad Num Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpAdd NameLoad Num Num BinOpMod BinOpAdd BinOpDiv NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpAdd BinOpAdd NameLoad Num Num Num BinOpAdd BinOpAdd NameLoad Num Num AttributeLoad NameLoad attr Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If AttributeLoad NameLoad attr body If CompareLtLt Num NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad Num BinOpAdd BinOpAdd Num NameLoad Num BinOpAdd AttributeLoad NameLoad attr Num BinOpAdd BinOpAdd Num NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareLt Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr Num If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareLt Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpSub AttributeLoad NameLoad attr Num If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareLt Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpMod Str TupleLoad Num BinOpAdd Num AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Assign NameStore BinOpSub BinOpDiv NameLoad Num Num Assign NameStore BinOpAdd BinOpDiv NameLoad Num Num Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad NameLoad Num Num Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad BinOpSub NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Output svg/xml data for a marey graph

Marey graphs are a visualization form typically used for timetables. Time
is on the x-axis and position on the y-axis. This module reads data from a
transitfeed.Schedule and creates a marey graph in svg/xml format. The graph
shows the speed between stops for each trip of a route.

TODO: This module was taken from an internal Google tool. It works but is not
well intergrated into transitfeed and schedule_viewer. Also, it has lots of
ugly hacks to compensate set canvas size and so on which could be cleaned up.

For a little more information see (I didn't make this URL ;-)
http://transliteracies.english.ucsb.edu/post/research-project/research-clearinghouse-individual/research-reports/the-indexical-imagination-marey%e2%80%99s-graphic-method-and-the-technological-transformation-of-writing-in-the-nineteenth-century

  MareyGraph: Class, keeps cache of graph data and graph properties
               and draws marey graphs in svg/xml format on request.

 N/A itertools N/A transitfeed MareyGraph N/A N/A N/A Produces and caches marey graph from transit feed data. N/A _MAX_ZOOM 5.0 N/A _DUMMY_SEPARATOR 10 __init__ N/A N/A self N/A N/A N/A N/A self _cache N/A str N/A N/A self _stoplist N/A N/A N/A self _tlist N/A N/A N/A self _stations N/A N/A N/A self _decorators N/A N/A N/A self _tspan 30 N/A N/A self _offset 0 N/A N/A self _hour_grid 60 N/A N/A self _min_grid 5 N/A N/A self _zoomfactor 0.9 N/A N/A self _xoffset 0 N/A N/A self _yoffset 0 N/A N/A self _bgcolor lightgrey N/A N/A self _gwidth N/A N/A self _tspan N/A self _hour_grid N/A Draw N/A N/A self stoplist triplist height N/A None None 520 N/A N/A Main interface for drawing the marey graph.

    If called without arguments, the data generated in the previous call
    will be used. New decorators can be added between calls.

    Args:
      # Class Stop is defined in transitfeed.py
      stoplist: [Stop, Stop, ...]
      # Class Trip is defined in transitfeed.py
      triplist: [Trip, Trip, ...]

    Returns:
      # A string that contain a svg/xml web-page with a marey graph.
      " <svg  width="1440" height="520" version="1.1" ... "
     N/A output N/A str N/A N/A triplist N/A N/A triplist N/A N/A N/A stoplist N/A N/A stoplist N/A N/A N/A N/A N/A self _cache triplist stoplist N/A N/A N/A self _gheight height N/A N/A self _tlist triplist N/A N/A self _slist stoplist N/A N/A self _decorators N/A N/A N/A self _stations N/A N/A self _BuildStations stoplist N/A N/A self _cache N/A %s %s %s %s N/A N/A N/A self _DrawBox N/A N/A self _DrawHours N/A N/A self _DrawStations N/A N/A self _DrawTrips triplist N/A output N/A %s %s %s %s N/A N/A N/A self _DrawHeader N/A self _cache N/A N/A self _DrawDecorators N/A N/A self _DrawFooter N/A output N/A _DrawHeader N/A N/A self N/A N/A N/A svg_header N/A 
      <svg  width="%s" height="%s" version="1.1"
      xmlns="http://www.w3.org/2000/svg">
      <script type="text/ecmascript"><![CDATA[
       function init(evt) {
         if ( window.svgDocument == null )
            svgDocument = evt.target.ownerDocument;
       }
      var oldLine = 0;
      var oldStroke = 0;
      var hoffset= %s; // Data from python

      function parseLinePoints(pointnode){
        var wordlist = pointnode.split(" ");
        var xlist = new Array();
        var h;
        var m;
        // TODO: add linebreaks as appropriate
        var xstr = "  Stop Times :";
        for (i=0;i<wordlist.length;i=i+2){
          var coord = wordlist[i].split(",");
          h = Math.floor(parseInt((coord[0])-20)/60);
          m = parseInt((coord[0]-20))%%60;
          xstr = xstr +" "+ (hoffset+h) +":"+m;
        }

        return xstr;
      }

      function LineClick(tripid, x) {
        var line = document.getElementById(tripid);
        if (oldLine)
          oldLine.setAttribute("stroke",oldStroke);
        oldLine = line;
        oldStroke = line.getAttribute("stroke");

        line.setAttribute("stroke","#fff");

        var dynTxt = document.getElementById("dynamicText");
        var tripIdTxt = document.createTextNode(x);
        while (dynTxt.hasChildNodes()){
          dynTxt.removeChild(dynTxt.firstChild);
        }
        dynTxt.appendChild(tripIdTxt);
      }
      ]]> </script>
      <style type="text/css"><![CDATA[
      .T { fill:none; stroke-width:1.5 }
      .TB { fill:none; stroke:#e20; stroke-width:2 }
      .Station { fill:none; stroke-width:1 }
      .Dec { fill:none; stroke-width:1.5 }
      .FullHour { fill:none; stroke:#eee; stroke-width:1 }
      .SubHour { fill:none; stroke:#ddd; stroke-width:1 }
      .Label { fill:#aaa; font-family:Helvetica,Arial,sans;
       text-anchor:middle }
      .Info { fill:#111; font-family:Helvetica,Arial,sans;
      text-anchor:start; }
       ]]></style>
       <text class="Info" id="dynamicText" x="0" y="%d"></text>
       <g id="mcanvas"  transform="translate(%s,%s)">
       <g id="zcanvas" transform="scale(%s)">

        N/A N/A N/A N/A self _gwidth N/A self _xoffset 20 N/A N/A self _gheight 15 N/A self _offset N/A N/A self _gheight 10 N/A self _xoffset N/A self _yoffset N/A self _zoomfactor N/A svg_header N/A _DrawFooter N/A N/A self N/A N/A N/A </g></g></svg> N/A _DrawDecorators N/A N/A self N/A N/A N/A Used to draw fancy overlays on trip graphs. N/A N/A N/A join N/A self _decorators N/A _DrawBox N/A N/A self N/A N/A N/A tmpstr N/A <rect x="%s" y="%s" width="%s" height="%s"
                fill="lightgrey" stroke="%s" stroke-width="2" />
              N/A 0 0 N/A N/A self _gwidth 20 N/A self _gheight N/A self _bgcolor N/A tmpstr N/A _BuildStations N/A N/A self stoplist N/A N/A N/A Dispatches the best algorithm for calculating station line position.

    Args:
      # Class Stop is defined in transitfeed.py
      stoplist: [Stop, Stop, ...]
      # Class Trip is defined in transitfeed.py
      triplist: [Trip, Trip, ...]

    Returns:
      # One integer y-coordinate for each station normalized between
      # 0 and X, where X is the height of the graph in pixels
      [0, 33, 140, ... , X]
     N/A stations N/A N/A dists N/A N/A self _EuclidianDistances stoplist N/A stations N/A N/A self _CalculateYLines dists N/A stations N/A _EuclidianDistances N/A N/A self slist N/A N/A N/A Calculate euclidian distances between stops.

    Uses the stoplists long/lats to approximate distances
    between stations and build a list with y-coordinates for the
    horizontal lines in the graph.

    Args:
      # Class Stop is defined in transitfeed.py
      stoplist: [Stop, Stop, ...]

    Returns:
      # One integer for each pair of stations
      # indicating the approximate distance
      [0,33,140, ... ,X]
     N/A e_dists2 N/A N/A N/A transitfeed ApproximateDistanceBetweenStops stop tail N/A N/A stop tail N/A N/A itertools izip slist N/A slist N/A 1 N/A e_dists2 N/A _CalculateYLines N/A N/A self dists N/A N/A N/A Builds a list with y-coordinates for the horizontal lines in the graph.

    Args:
      # One integer for each pair of stations
      # indicating the approximate distance
      dists: [0,33,140, ... ,X]

    Returns:
      # One integer y-coordinate for each station normalized between
      # 0 and X, where X is the height of the graph in pixels
      [0, 33, 140, ... , X]
     N/A tot_dist N/A sum dists N/A N/A tot_dist 0 N/A N/A pixel_dist N/A N/A N/A float N/A d N/A N/A self _gheight 20 tot_dist N/A d dists N/A pixel_grid N/A N/A 0 N/A N/A int N/A pd N/A sum N/A pixel_dist N/A 0 i N/A N/A i pd N/A enumerate pixel_dist N/A N/A pixel_grid N/A N/A pixel_grid N/A _TravelTimes N/A N/A self triplist index N/A 0 N/A N/A  Calculate distances and plot stops.

    Uses a timetable to approximate distances
    between stations

    Args:
    # Class Trip is defined in transitfeed.py
    triplist: [Trip, Trip, ...]
    # (Optional) Index of Triplist prefered for timetable Calculation
    index: 3

    Returns:
    # One integer for each pair of stations
    # indicating the approximate distance
    [0,33,140, ... ,X]
     DistanceInTravelTime N/A N/A dep_secs arr_secs N/A N/A N/A t_dist N/A arr_secs dep_secs N/A N/A t_dist 0 N/A N/A t_dist N/A self _DUMMY_SEPARATOR N/A t_dist N/A N/A N/A triplist N/A N/A N/A N/A N/A 0 index N/A len triplist N/A N/A trip N/A triplist N/A index N/A N/A trip N/A triplist N/A 0 N/A t_dists2 N/A N/A DistanceInTravelTime N/A stop N/A 3 N/A tail N/A 2 N/A N/A stop tail N/A N/A itertools izip N/A N/A trip GetTimeStops N/A N/A N/A trip GetTimeStops N/A 1 N/A t_dists2 N/A _AddWarning N/A N/A self str N/A N/A N/A str N/A _DrawTrips N/A N/A self triplist colpar N/A N/A N/A Generates svg polylines for each transit trip.

    Args:
      # Class Trip is defined in transitfeed.py
      [Trip, Trip, ...]

    Returns:
      # A string containing a polyline tag for each trip
      ' <polyline class="T" stroke="#336633" points="433,0 ...'
     N/A stations N/A N/A N/A N/A N/A self _stations triplist N/A N/A N/A self _stations N/A N/A self _CalculateYLines N/A N/A self _TravelTimes triplist N/A N/A N/A self _stations N/A N/A N/A N/A self _AddWarning Failed to use traveltimes for graph N/A N/A self _stations N/A N/A self _CalculateYLines N/A N/A self _Uniform triplist N/A N/A N/A self _stations N/A N/A N/A N/A self _AddWarning Failed to calculate station distances N/A N/A stations N/A self _stations N/A tmpstrs N/A N/A servlist N/A N/A t triplist N/A N/A N/A colpar N/A N/A N/A N/A t service_id servlist N/A N/A N/A N/A servlist append N/A t service_id N/A shade N/A int N/A N/A N/A N/A servlist index N/A t service_id N/A 200 N/A len servlist 55 N/A color N/A #00%s00 N/A N/A hex shade N/A 2 4 N/A N/A color colpar N/A start_offsets N/A 0 N/A first_stop N/A N/A N/A t GetTimeStops N/A 0 N/A N/A j freq_offset N/A enumerate start_offsets N/A N/A N/A N/A j 0 N/A colpar N/A N/A color purple N/A scriptcall N/A onmouseover="LineClick('%s','Trip %s starting %s')" N/A N/A t trip_id N/A t trip_id N/A N/A transitfeed FormatSecondsSinceMidnight N/A N/A t GetStartTime N/A tmpstrhead N/A <polyline class="T" id="%s" stroke="%s" %s points=" N/A N/A str N/A t trip_id color scriptcall N/A N/A N/A tmpstrs append tmpstrhead N/A N/A i s N/A enumerate N/A N/A t GetTimeStops N/A N/A arr_t N/A s N/A 0 N/A dep_t N/A s N/A 1 N/A N/A N/A arr_t None N/A dep_t None N/A N/A N/A arr_x N/A N/A int N/A N/A arr_t 3600.0 N/A self _hour_grid N/A N/A self _hour_grid N/A self _offset N/A dep_x N/A N/A int N/A N/A dep_t 3600.0 N/A self _hour_grid N/A N/A self _hour_grid N/A self _offset N/A N/A N/A tmpstrs append N/A %s,%s  N/A N/A int N/A arr_x 20 N/A int N/A N/A stations N/A i 20 N/A N/A N/A tmpstrs append N/A %s,%s  N/A N/A int N/A dep_x 20 N/A int N/A N/A stations N/A i 20 N/A N/A N/A tmpstrs append " /> N/A N/A N/A join tmpstrs N/A _Uniform N/A N/A self triplist N/A N/A N/A Fallback to assuming uniform distance between stations N/A longest N/A max N/A N/A len N/A N/A t GetTimeStops N/A t triplist N/A N/A N/A 100 longest N/A _DrawStations N/A N/A self color N/A #aaa N/A N/A Generates svg with a horizontal line for each station/stop.

    Args:
      # Class Stop is defined in transitfeed.py
      stations: [Stop, Stop, ...]

    Returns:
      # A string containing a polyline tag for each stop
      " <polyline class="Station" stroke="#336633" points="20,0 ..."
     N/A stations N/A self _stations N/A tmpstrs N/A N/A y stations N/A N/A N/A N/A tmpstrs append N/A   <polyline class="Station" stroke="%s"       points="%s,%s, %s,%s" /> N/A color 20 N/A N/A 20 y 0.5 N/A N/A self _gwidth 20 N/A N/A 20 y 0.5 N/A N/A N/A join tmpstrs N/A _DrawHours N/A N/A self N/A N/A N/A Generates svg to show a vertical hour and sub-hour grid

    Returns:
      # A string containing a polyline tag for each grid line
      " <polyline class="FullHour" points="20,0 ..."
     N/A tmpstrs N/A N/A i N/A range 0 N/A self _gwidth N/A self _min_grid N/A N/A N/A N/A i N/A self _hour_grid 0 N/A N/A N/A N/A tmpstrs append N/A <polyline class="FullHour" points="%d,%d, %d,%d" /> N/A N/A N/A i 0.5 20 20 N/A N/A i 0.5 20 N/A self _gheight N/A N/A N/A tmpstrs append N/A <text class="Label" x="%d" y="%d">%d</text> N/A N/A i 20 20 N/A N/A N/A i N/A self _hour_grid N/A self _offset 24 N/A N/A N/A N/A tmpstrs append N/A <polyline class="SubHour" points="%d,%d,%d,%d" /> N/A N/A N/A i 0.5 20 20 N/A N/A i 0.5 20 N/A self _gheight N/A N/A N/A join tmpstrs N/A AddStationDecoration N/A N/A self index color N/A #f00 N/A N/A Flushes existing decorations and highlights the given station-line.

    Args:
      # Integer, index of stop to be highlighted.
      index: 4
      # An optional string with a html color code
      color: "#fff"
     N/A tmpstr N/A str N/A num_stations N/A len N/A self _stations N/A ind N/A int index N/A N/A self _stations N/A N/A N/A 0 ind num_stations N/A N/A y N/A N/A self _stations N/A ind N/A tmpstr N/A <polyline class="Dec" stroke="%s" points="%s,%s,%s,%s" /> N/A color 20 N/A N/A 20 y 0.5 N/A N/A self _gwidth 20 N/A N/A 20 y 0.5 N/A N/A N/A N/A self _decorators append tmpstr N/A AddTripDecoration N/A N/A self triplist color N/A #f00 N/A N/A Flushes existing decorations and highlights the given trips.

    Args:
      # Class Trip is defined in transitfeed.py
      triplist: [Trip, Trip, ...]
      # An optional string with a html color code
      color: "#fff"
     N/A tmpstr N/A N/A self _DrawTrips triplist color N/A N/A N/A N/A self _decorators append tmpstr N/A ChangeScaleFactor N/A N/A self newfactor N/A N/A N/A Changes the zoom of the graph manually.

    1.0 is the original canvas size.

    Args:
      # float value between 0.0 and 5.0
      newfactor: 0.7
     N/A N/A N/A N/A float newfactor 0 N/A N/A float newfactor N/A self _MAX_ZOOM N/A N/A N/A self _zoomfactor newfactor N/A ScaleLarger N/A N/A self N/A N/A N/A Increases the zoom of the graph one step (0.1 units). N/A newfactor N/A N/A self _zoomfactor 0.1 N/A N/A N/A N/A float newfactor 0 N/A N/A float newfactor N/A self _MAX_ZOOM N/A N/A N/A self _zoomfactor newfactor N/A ScaleSmaller N/A N/A self N/A N/A N/A Decreases the zoom of the graph one step(0.1 units). N/A newfactor N/A N/A self _zoomfactor 0.1 N/A N/A N/A N/A float newfactor 0 N/A N/A float newfactor N/A self _MAX_ZOOM N/A N/A N/A self _zoomfactor newfactor N/A ClearDecorators N/A N/A self N/A N/A N/A Removes all the current decorators.
     N/A N/A self _decorators N/A N/A AddTextStripDecoration N/A N/A self txtstr N/A N/A N/A tmpstr N/A <text class="Info" x="%d" y="%d">%s</text> N/A 0 N/A 20 N/A self _gheight txtstr N/A N/A N/A N/A self _decorators append tmpstr N/A SetSpan N/A N/A self first_arr last_arr mint maxt N/A 5 30 N/A N/A s_hour N/A N/A first_arr 3600 1 N/A e_hour N/A N/A last_arr 3600 1 N/A N/A self _offset N/A max N/A min s_hour 23 0 N/A N/A self _tspan N/A max N/A min N/A e_hour s_hour maxt mint N/A N/A self _gwidth N/A N/A self _tspan N/A self _hour_grid N/A N/A