Fixed plotting of dataframes
Changed self.templates to templates to fix plotting of dataframes.
diff --git a/tests/test_plotter.py b/tests/test_plotter.py
index 63595eb..e675311 100644
--- a/tests/test_plotter.py
+++ b/tests/test_plotter.py
@@ -16,6 +16,7 @@
import unittest
import matplotlib
+import numpy as np
import pandas as pd
import tempfile
import os
@@ -185,6 +186,12 @@
"cpu_out_power:power"],
pivot="cpus")
+ def test_lineplot_dataframe(self):
+ """LinePlot plots DataFrames without exploding"""
+ data = np.random.randn(4, 2)
+ dfr = pd.DataFrame(data, columns=["tick", "tock"]).cumsum()
+ trappy.LinePlot(dfr, column=["tick"]).view(test=True)
+
def test_get_trace_event_data_corrupted_trace(self):
"""get_trace_event_data() works with a corrupted trace"""
from trappy.plotter.Utils import get_trace_event_data