trappy.plotter.ILinePlot module¶
This module contains the class for plotting and customizing
Line/Linear Plots with trappy.trace.BareTrace
or derived
classes. This plot only works when run from an IPython notebook
-
class
trappy.plotter.ILinePlot.
ILinePlot
(traces, templates=None, **kwargs)[source]¶ Bases:
trappy.plotter.AbstractDataPlotter.AbstractDataPlotter
This class uses
trappy.plotter.Constraint.Constraint
to represent different permutations of input parameters. These constraints are generated by creating an instance oftrappy.plotter.Constraint.ConstraintManager
.Parameters: - traces (a list of
trappy.trace.FTrace
,trappy.trace.SysTrace
,trappy.trace.BareTrace
orpandas.DataFrame
or a single instance of them.) – The input data - column ((str, list(str))) – specifies the name of the column to be plotted.
- templates (
trappy.base.Base
) –TRAPpy events
Note
This is not required if a
pandas.DataFrame
is used - filters (dict) –
Filter the column to be plotted as per the specified criteria. For Example:
filters = { "pid": [ 3338 ], "cpu": [0, 2, 4], }
- per_line (int) – Used to control the number of graphs in each graph subplot row
- concat (bool) – Draw all the pivots on a single graph
- permute (bool) – Draw one plot for each of the traces specified
- fill (bool) – Fill the area under the plots
- xlim (tuple) – A tuple representing the upper and lower xlimits
- ylim (tuple) – A tuple representing the upper and lower ylimits
- drawstyle (str) –
Set the drawstyle to a matplotlib compatible drawing style.
Note
Only “steps-post” is supported as a valid value for the drawstyle. This creates a step plot.
- sync_zoom (boolean) – Synchronize the zoom of a group of plots. Zooming in one plot of a group (see below) will zoom in every plot of that group. Defaults to False.
- group (string) – Name given to the plots created by this ILinePlot instance. This name is only used for synchronized zoom. If you zoom on any plot in a group all plots will zoom at the same time.
- signals (str) –
A string of the type event_name:column to indicate the value that needs to be plotted. You can add an additional parameter to specify the color of the lin in rgb: “event_name:column:color”. The color is specified as a comma separated list of rgb values, from 0 to 255 or from 0x0 to 0xff. E.g. 0xff,0x0,0x0 is red and 100,40,32 is brown.
Note
- Only one of signals or both templates and columns should be specified
- Signals format won’t work for
pandas.DataFrame
input
-
view
(max_datapoints=75000, test=False)[source]¶ Displays the graph
Parameters: max_datapoints – Maximum number of datapoints to plot. Dygraph can make the browser unresponsive if it tries to plot too many datapoints. Chrome 50 chokes at around 75000 on an i7-4770 @ 3.4GHz, Firefox 47 can handle up to 200000 before becoming too slow in the same machine. You can increase this number if you know what you’re doing and are happy to wait for the plot to render. :type max_datapoints: int
Parameters: test – For testing purposes. Only set to true if run from the testsuite. :type test: boolean
- traces (a list of