BUG: Clean up imports

This commit is contained in:
Tony S Yu
2012-11-15 23:53:47 -05:00
parent 0d411e21dc
commit 9d653fec78
4 changed files with 21 additions and 6 deletions
+10 -2
View File
@@ -1,7 +1,14 @@
import numpy as np
from PyQt4 import QtGui
import matplotlib.pyplot as plt
try:
from PyQt4 import QtGui
except ImportError:
print("Could not import PyQt4 -- skimage.viewer not available.")
try:
import matplotlib.pyplot as plt
except ImportError:
print("Could not import matplotlib -- skimage.viewer not available.")
from ..utils import MatplotlibCanvas
from .base import Plugin
@@ -18,6 +25,7 @@ class PlotCanvas(MatplotlibCanvas):
super(PlotCanvas, self).__init__(parent, self.fig, **kwargs)
self.setMinimumHeight(150)
class PlotPlugin(Plugin):
"""Plugin for ImageViewer that contains a plot canvas.