Skip to content

Commit 019b0a4

Browse files
committed
imshow bugfix and updates to v0.9.3
small bugfix: we weren't properly removing the space for a title when it was set to None. this fixes that and then updates to 0.9.3
1 parent 4394bf1 commit 019b0a4

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
![Python version](https://img.shields.io/badge/python-3.5%7C3.6%7C3.7-blue.svg)
66
[![Build Status](https://travis-ci.com/LabForComputationalVision/pyrtools.svg?branch=master)](https://travis-ci.com/LabForComputationalVision/pyrtools)
77
[![Documentation Status](https://readthedocs.org/projects/pyrtools/badge/?version=latest)](https://pyrtools.readthedocs.io/en/latest/?badge=latest)
8-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v0.9.2?filepath=TUTORIALS%2F)
8+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v0.9.3?filepath=TUTORIALS%2F)
99

1010
Briefly, the tools include:
1111
- Recursive multi-scale image decompositions (pyramids), including

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
:target: https://travis-ci.com/LabForComputationalVision/pyrtools
1111

1212
.. |binder| image:: https://mybinder.org/badge_logo.svg
13-
:target: https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v0.9.2?filepath=TUTORIALS%2F
13+
:target: https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v0.9.3?filepath=TUTORIALS%2F
1414

1515
.. pyrtools documentation master file, created by
1616
sphinx-quickstart on Mon Mar 25 17:57:12 2019.

docs/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ For more details, see the jupyter notebooks included in the
3131
`TUTORIALS/` directory, static versions of which are linked in the
3232
navigation sidebar. You can play around with a live version of them in
3333
order to test out the code before downloading on `binder
34-
<https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v0.9.2?filepath=TUTORIALS%2F>`_
34+
<https://mybinder.org/v2/gh/LabForComputationalVision/pyrtools/v0.9.3?filepath=TUTORIALS%2F>`_

pyrtools/tools/display.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,15 @@ def imshow(image, vrange='indep1', zoom=1, title='', col_wrap=None, ax=None,
443443
except AttributeError:
444444
# then this is a list and we don't do anything
445445
pass
446+
# want to do this check before converting title to a list (at which
447+
# point `title is None` will always be False). we do it here instad
448+
# of checking whether the first item of title is None because it's
449+
# conceivable that the user passed `title=[None, 'important
450+
# title']`, and in that case we do want the space for the title
451+
if title is None:
452+
vert_pct = 1
453+
else:
454+
vert_pct = .8
446455
if not isinstance(title, list):
447456
title = len(image) * [title]
448457
else:
@@ -493,10 +502,6 @@ def imshow(image, vrange='indep1', zoom=1, title='', col_wrap=None, ax=None,
493502
else:
494503
n_cols = col_wrap
495504
n_rows = int(np.ceil(image.shape[0] / n_cols))
496-
if title is None:
497-
vert_pct = 1
498-
else:
499-
vert_pct = .8
500505
fig = make_figure(n_rows, n_cols, zoom * max_shape, vert_pct=vert_pct)
501506
axes = fig.axes
502507
else:

pyrtools/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '0.9.2'
1+
version = '0.9.3'

0 commit comments

Comments
 (0)