aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcorrelate_with_ref.py6
1 files 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__":