Skip to content

Commit d01be00

Browse files
author
Eric Culbertson
committed
added some documentation
Signed-off-by: Eric Culbertson <[email protected]>
1 parent 52f739d commit d01be00

File tree

1 file changed

+10
-3
lines changed
  • pyrasterframes/src/main/python/pyrasterframes

1 file changed

+10
-3
lines changed

pyrasterframes/src/main/python/pyrasterframes/rf_types.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,15 @@ def _repr_png_(self):
363363
from pyrasterframes.rf_ipython import tile_to_png
364364
return tile_to_png(self)
365365

366-
def show(self, lower_percentile=1, upper_percentile=99, axis=None):
367-
""""""
366+
def show(self, lower_percentile=1, upper_percentile=99, axis=None, **imshow_args):
367+
"""
368+
Display an image of the tile
369+
:param lower_percentile: between 0 and 100 inclusive. Specifies to clip values below this percentile
370+
:param upper_percentile: between 0 and 100 inclusive. Specifies to clip values above this percentile
371+
:param axis: MatPlotLib axis object to plot onto. Creates new axis if None
372+
:param imshow_args: parameters to pass into matplotlib.pyplot.imshow
373+
:return created or modified axis object
374+
"""
368375

369376
if axis is None:
370377
import matplotlib.pyplot as plt
@@ -383,7 +390,7 @@ def normalize_cells(cells, lower_percentile=lower_percentile, upper_percentile=u
383390
axis.xaxis.set_ticks([])
384391
axis.yaxis.set_ticks([])
385392

386-
axis.imshow(normalize_cells(arr))
393+
axis.imshow(normalize_cells(arr), **imshow_args)
387394

388395
return axis
389396

0 commit comments

Comments
 (0)