added doc to PaintTool

some doctest on showa

more doctest skip

deleted unwanted spaces

reference to paint object skipped

unwanted _

typo in #doctest

fixing coverall problem
This commit is contained in:
Salvatore Scaramuzzino
2016-02-07 22:35:06 +01:00
parent 66102ad91a
commit 295d2fc8dc
+18
View File
@@ -37,6 +37,24 @@ class PaintTool(CanvasToolBase):
Overlay of painted labels displayed on top of image.
label : int
Current paint color.
Examples
----------
>>> from skimage.data import camera
>>> import matplotlib.pyplot as plt
>>> from skimage.viewer.canvastools import PaintTool
>>> import numpy as np
>>> img = camera() #doctest: +SKIP
>>> ax = plt.subplot(111) #doctest: +SKIP
>>> plt.imshow(img, cmap=plt.cm.gray) #doctest: +SKIP
>>> p = PaintTool(ax,np.shape(img[:-1]),10,0.2) #doctest: +SKIP
>>> plt.show() #doctest: +SKIP
>>> mask = p.overlay #doctest: +SKIP
>>> plt.imshow(mask,cmap=plt.cm.gray) #doctest: +SKIP
>>> plt.show() #doctest: +SKIP
"""
def __init__(self, manager, overlay_shape, radius=5, alpha=0.3,
on_move=None, on_release=None, on_enter=None,