mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-11 10:31:50 +08:00
BUG: Clean up imports
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import numpy as np
|
||||
import matplotlib as mpl
|
||||
from matplotlib import lines
|
||||
|
||||
try:
|
||||
import matplotlib as mpl
|
||||
from matplotlib import lines
|
||||
except ImportError:
|
||||
print("Could not import matplotlib -- skimage.viewer not available.")
|
||||
|
||||
|
||||
__all__ = ['CanvasToolBase', 'ToolHandles']
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import numpy as np
|
||||
from matplotlib import lines
|
||||
|
||||
try:
|
||||
from matplotlib import lines
|
||||
except ImportError:
|
||||
print("Could not import matplotlib -- skimage.viewer not available.")
|
||||
|
||||
from base import CanvasToolBase, ToolHandles
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ home/end keys
|
||||
First/last image in collection.
|
||||
|
||||
"""
|
||||
import numpy as np
|
||||
from skimage import data
|
||||
from skimage.viewer import CollectionViewer
|
||||
from skimage.transform import pyramid_gaussian
|
||||
|
||||
Reference in New Issue
Block a user