From e359479f2ca631686d8c20153dc54b109b917f5b Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 25 Jul 2016 20:26:26 +0200 Subject: Fix autonomous correlate_with_ref plotting --- correlate_with_ref.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/correlate_with_ref.py b/correlate_with_ref.py index 997081b..ab55682 100755 --- a/correlate_with_ref.py +++ b/correlate_with_ref.py @@ -20,6 +20,8 @@ import matplotlib # And http://matplotlib.org/examples/api/agg_oo.html#api-agg-oo if __name__ != "__main__": from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas +else: + import matplotlib.pyplot as pp import matplotlib.figure import sys @@ -122,7 +124,7 @@ class CIR_Correlate: fig = matplotlib.figure.Figure() canvas = FigureCanvas(fig) else: - fig = matplotlib.figure() + fig = pp.figure() fig.suptitle(title) ax1 = fig.add_subplot(211) @@ -135,7 +137,7 @@ class CIR_Correlate: canvas.print_figure(plot_file) else: print("Plotting to screen") - fig.show() + pp.show() if __name__ == "__main__": -- cgit v1.2.3