Skip to content

Commit

Permalink
grayscale example added to Viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrm@au1.ibm.com committed Nov 15, 2019
1 parent 7d0ad59 commit 5ce881b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nutsml/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def __init__(self, imgcols, layout=(1, None), figsize=None,
>>> samples = [(1, 'nut_color'), (2, 'nut_grayscale')]
>>> read_image = ReadImage(1, imagepath)
>>> samples >> read_image >> ViewImage(1) >> Consume() # doctest: +SKIP
>>> samples >> read_image >> ViewImage(1, cmap='gray') >> Consume() # doctest: +SKIP
:param int|tuple|None imgcols: Index or tuple of indices of data columns
containing images (ndarray). Use None if images are provided
Expand All @@ -123,7 +124,7 @@ def __init__(self, imgcols, layout=(1, None), figsize=None,
every 2.5 sec every_sec = 2.5
:param int every_n: View every n-th call.
:param kwargs imargs: Keyword arguments passed on to matplotlib's
imshow() function. See
imshow() function, e.g. cmap='gray'. See
http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.imshow
"""
imgcols = (None,) if imgcols is None else as_tuple(imgcols)
Expand Down

0 comments on commit 5ce881b

Please sign in to comment.