Skip to content

Commit 6cf65c8

Browse files
authored
round up instead of round down (#167)
changed from rounding down to rounding up. Rounding down doesn't seem to work, say when we want to plot 5 or 7 figures.
1 parent 4334a71 commit 6cf65c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyro/util/plot_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def setup_axes(myg, num):
5555

5656
else:
5757
# 2-d grid of plots
58-
ny = int(math.sqrt(num))
59-
nx = num//ny
58+
ny = math.ceil(math.sqrt(num))
59+
nx = math.ceil(num/ny)
6060

6161
axes = ImageGrid(f, 111,
6262
nrows_ncols=(nx, ny),

0 commit comments

Comments
 (0)