The visualization module provides a variety of functions to visualize initial, intermediate and final datasets within trackintel.


trackintel.plot(positionfixes=None, staypoints=None, triplegs=None, locations=None, radius_sp=100, radius_locs=150, filename=None, plot_osm=False, ax=None)[source]

Plots positionfixes, staypoints, locations on a map (optionally to a file)

One of the arguments [positionfixes, staypoints, triplegs, locations] should not be None!

  • positionfixes (Positionfixes, optional) – Positionfixes to plot, by default None

  • staypoints (Staypoints, optional) – Staypoints to plot, by default None

  • triplegs (Triplegs, optional) – Triplegs to plot, by default None

  • locations (Locations, optional) – Locations to plot, by default None

  • radius_sp (float, optional) – Radius in meter for circles around staypoints, default 100

  • radius_locs (float, optional) – Radius in meter for circles around locations, default 150

  • filename (str, optional) – The file to plot to, else if ax is none plot will be shown, by default None

  • plot_osm (bool, optional) – If True, will download OSM street network and plot it as base map, by default False If True depending on the extent of your data, this might take a long time!

  • ax (matplotlib.pyplot.Artist, optional) – axis on which to draw the plot, by default None


>>> ti.plot(positionfixes=pfs, filename="output.png", plot_osm=True)