In [1]:
%matplotlib inline
import pandas as pd
import trappy

In [2]:
dfr = pd.DataFrame({"foo": [1, 2, 3], "bar": [2, 3, 1], "baz":[3, 2, 1]})

Simple bar plot of one column


In [3]:
trappy.BarPlot(dfr, column="foo").view()


Multiple columns


In [4]:
trappy.BarPlot(dfr, column=["foo", "bar"], title="Multiple columns").view()


Stacked plot


In [5]:
trappy.BarPlot(dfr, column=["foo", "bar", "baz"], stacked=True).view()


Signals

Signals only work with trappy traces. Let's first get a trace.


In [6]:
trace = trappy.BareTrace()
trace.add_parsed_event("my_event", dfr)

If you have a trappy trace, you can use the signal syntax instead of columns and templates


In [7]:
trappy.BarPlot(trace, signals=["my_event:baz", "my_event:foo"]).view()