Teetool
Probabilistic modelling of trajectories
Public Member Functions | Private Member Functions | Private Attributes | List of all members
teetool.visual_2d.Visual_2d Class Reference

Visual_2d class generates the 2d output using Matplotlib. More...

Inheritance diagram for teetool.visual_2d.Visual_2d:

Public Member Functions

def __init__ (self, thisWorld, kwargs)
 Constructor for Visual_2d. More...
 
def plotMean (self, list_icluster=None, colour=None, kwargs)
 Plot mean of trajectories. More...
 
def plotTrajectories (self, list_icluster=None, ntraj=50, colour=None, kwargs)
 Plot trajectories of cluster. More...
 
def plotTrajectoriesPoints (self, x1, list_icluster=None, ntraj=50, colour=None, kwargs)
 Plot trajectories of cluster. More...
 
def plotTimeSeries (self, icluster=0, ntraj=50, colour='k', kwargs)
 Plot time-series of trajectories. More...
 
def plotBox (self, coord_lowerleft, coord_upperright, kwargs)
 Plot a box based on two coordinates. More...
 
def plot (self, args, kwargs)
 standard plotting function for Matplotlib More...
 
def plotSamples (self, list_icluster=None, ntraj=50, colour=None, kwargs)
 Plot samples of model. More...
 
def plotLegend (self)
 Add legend to plot. More...
 
def plotTube (self, list_icluster=None, sdwidth=1, z=None, resolution=None, colour=None, alpha=.1, kwargs)
 Plots a confidence region of variance sigma. More...
 
def plotTubeDifference (self, list_icluster=None, sdwidth=1, z=None, resolution=None, colour=None, alpha=.1, kwargs)
 Plots the difference confidence region of variance sigma for two models. More...
 
def plotLogLikelihood (self, list_icluster=None, pmin=0, pmax=1, z=None, resolution=None)
 Plot the log-likehood of confidence regions – which can be related to traffic complexity in the future. More...
 
def save (self, add=None)
 saves the figure to a file in the output folder More...
 
def show (self)
 shows the figure (pop-up or inside notebook) More...
 
def close (self)
 closes all figures More...
 

Private Member Functions

def _plotTitle (self)
 Plots an outline of the trajectories. More...
 

Private Attributes

 _fig
 figure object More...
 
 _ax
 axis object More...
 
 _world
 World object. More...
 
 _labels
 Labels of plots. More...
 

Detailed Description

Visual_2d class generates the 2d output using Matplotlib.

Even 3-dimensional trajectories can be output in 2d (sliced)

Constructor & Destructor Documentation

§ __init__()

def teetool.visual_2d.Visual_2d.__init__ (   self,
  thisWorld,
  kwargs 
)

Constructor for Visual_2d.

Parameters
selfobject pointer
thisWorldWorld object, filled with trajectory data and models
kwargsadditional parameters for plt.figure()
<description>

Member Function Documentation

§ _plotTitle()

def teetool.visual_2d.Visual_2d._plotTitle (   self)
private

Plots an outline of the trajectories.

Parameters
selfobject pointer def plotOutline(self):

TODO draw a box

Plots the title or worldname

Parameters
selfobject pointer

§ close()

def teetool.visual_2d.Visual_2d.close (   self)

closes all figures

Parameters
selfobject pointer

§ plot()

def teetool.visual_2d.Visual_2d.plot (   self,
  args,
  kwargs 
)

standard plotting function for Matplotlib

Parameters
selfobject pointer
argsadditional arguments for plotting
kwargsadditional labeled parameters for plotting

§ plotBox()

def teetool.visual_2d.Visual_2d.plotBox (   self,
  coord_lowerleft,
  coord_upperright,
  kwargs 
)

Plot a box based on two coordinates.

Parameters
selfobject pointer
coord_lowerleftlower-left coordinate (x,y)
coord_upperrightupper-right coordinate (x,y)
kwargsadditional parameters for plotting

§ plotLegend()

def teetool.visual_2d.Visual_2d.plotLegend (   self)

Add legend to plot.

Parameters
selfobject pointer

§ plotLogLikelihood()

def teetool.visual_2d.Visual_2d.plotLogLikelihood (   self,
  list_icluster = None,
  pmin = 0,
  pmax = 1,
  z = None,
  resolution = None 
)

Plot the log-likehood of confidence regions – which can be related to traffic complexity in the future.

Parameters
selfobject pointer
list_iclusterlist of clusters to compare
pminminimum value on a normalised scale
pmaxmaximum value on a normalised scale
zif specified, it evaluates the confidence region at a constant altitude for 3D trajectories
resolutionspecify resolution of region

§ plotMean()

def teetool.visual_2d.Visual_2d.plotMean (   self,
  list_icluster = None,
  colour = None,
  kwargs 
)

Plot mean of trajectories.

Parameters
selfobject pointer
list_iclusterlist of clusters to plot
colourif specified, overwrites distinct colours
kwargsadditional parameters for plotting

§ plotSamples()

def teetool.visual_2d.Visual_2d.plotSamples (   self,
  list_icluster = None,
  ntraj = 50,
  colour = None,
  kwargs 
)

Plot samples of model.

Parameters
selfobject pointer
list_iclusterlist of clusters to plot
ntrajnumber of trajectories
colourif specified, overwrites distinct colours
kwargsadditional parameters for plotting

§ plotTimeSeries()

def teetool.visual_2d.Visual_2d.plotTimeSeries (   self,
  icluster = 0,
  ntraj = 50,
  colour = 'k',
  kwargs 
)

Plot time-series of trajectories.

Parameters
selfobject pointer
iclusterselect cluster to plot
ntrajmaximum number of trajectories
colourspecificy colour of trajectories
kwargsadditional parameters for plotting

§ plotTrajectories()

def teetool.visual_2d.Visual_2d.plotTrajectories (   self,
  list_icluster = None,
  ntraj = 50,
  colour = None,
  kwargs 
)

Plot trajectories of cluster.

Parameters
selfobject pointer
list_iclusterlist of clusters to plot
ntrajmaximum number of trajectories
colourif specified, overwrites distinct colours
kwargsadditional parameters for plotting

§ plotTrajectoriesPoints()

def teetool.visual_2d.Visual_2d.plotTrajectoriesPoints (   self,
  x1,
  list_icluster = None,
  ntraj = 50,
  colour = None,
  kwargs 
)

Plot trajectories of cluster.

Parameters
selfobject pointer
x1point from [0,1] to visualise
list_iclusterlist of clusters to plot
ntrajmaximum number of trajectories
colourif specified, overwrites distinct colours
kwargsadditional parameters for plotting

§ plotTube()

def teetool.visual_2d.Visual_2d.plotTube (   self,
  list_icluster = None,
  sdwidth = 1,
  z = None,
  resolution = None,
  colour = None,
  alpha = .1,
  kwargs 
)

Plots a confidence region of variance sigma.

Parameters
selfobject pointer
list_iclusterlist of clusters to plot
sdwidthvariance to evaluate
zif specified, it evaluates the confidence region at a constant altitude for 3D trajectories
resolutionsets resolution for which to calculate the tube, can be a single integer, or an actual measurement [dim1 dim2] (2d) [dim1 dim2 dim3] (3d)
colourif specified, overwrites distinct colours
alphaopacity for the confidence region
kwargsadditional parameters for plotting

§ plotTubeDifference()

def teetool.visual_2d.Visual_2d.plotTubeDifference (   self,
  list_icluster = None,
  sdwidth = 1,
  z = None,
  resolution = None,
  colour = None,
  alpha = .1,
  kwargs 
)

Plots the difference confidence region of variance sigma for two models.

Parameters
selfobject pointer
list_iclusterlist of 2 clusters to compare
sdwidthvariance to evaluate
zif specified, it evaluates the confidence region at a constant altitude for 3D trajectories
resolutionspecify resolution of region
colourif specified, overwrites distinct colours
alphaopacity for the confidence region
kwargsadditional parameters for plotting

§ save()

def teetool.visual_2d.Visual_2d.save (   self,
  add = None 
)

saves the figure to a file in the output folder

Parameters
selfobject pointer
addadditional identifier for file

§ show()

def teetool.visual_2d.Visual_2d.show (   self)

shows the figure (pop-up or inside notebook)

Parameters
selfobject pointer

Member Data Documentation

§ _ax

teetool.visual_2d.Visual_2d._ax
private

axis object

§ _fig

teetool.visual_2d.Visual_2d._fig
private

figure object

§ _labels

teetool.visual_2d.Visual_2d._labels
private

Labels of plots.

§ _world

teetool.visual_2d.Visual_2d._world
private

World object.


The documentation for this class was generated from the following file: