from skimage import draw
import matplotlib.pyplot as plt
import numpy as np
import photomosaic as pm

img = np.zeros((1000, 1000))
rr, cc = draw.circle(300, 500, 150)
img[rr, cc] = 1
tiles = pm.partition(img, (10, 10), mask=img.astype(bool), depth=3)
plt.imshow(pm.draw_tiles(img, tiles, color=0.5))
plt.savefig('test-partition.png')

from skimage import draw
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import photomosaic as pm

img = np.zeros((1000, 1000))
rr, cc = draw.circle(300, 500, 150)
img[rr, cc] = 1
tiles = pm.partition(img, (10, 10), mask=img.astype(bool), depth=3)
plt.imshow(pm.draw_tile_layout(img, tiles, color=0.5))
plt.savefig('test-partition.png')

Update test to match API.
TST: Update test to match API.

  from skimage import draw
+ import matplotlib
+ matplotlib.use('Agg')
  import matplotlib.pyplot as plt
  import numpy as np
  import photomosaic as pm
  
  img = np.zeros((1000, 1000))
  rr, cc = draw.circle(300, 500, 150)
  img[rr, cc] = 1
  tiles = pm.partition(img, (10, 10), mask=img.astype(bool), depth=3)
- plt.imshow(pm.draw_tiles(img, tiles, color=0.5))
+ plt.imshow(pm.draw_tile_layout(img, tiles, color=0.5))
  plt.savefig('test-partition.png')
  
Update test to match API.
## Code Before:
from skimage import draw
import matplotlib.pyplot as plt
import numpy as np
import photomosaic as pm

img = np.zeros((1000, 1000))
rr, cc = draw.circle(300, 500, 150)
img[rr, cc] = 1
tiles = pm.partition(img, (10, 10), mask=img.astype(bool), depth=3)
plt.imshow(pm.draw_tiles(img, tiles, color=0.5))
plt.savefig('test-partition.png')

## Instruction:
Update test to match API.
## Code After:
from skimage import draw
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import photomosaic as pm

img = np.zeros((1000, 1000))
rr, cc = draw.circle(300, 500, 150)
img[rr, cc] = 1
tiles = pm.partition(img, (10, 10), mask=img.astype(bool), depth=3)
plt.imshow(pm.draw_tile_layout(img, tiles, color=0.5))
plt.savefig('test-partition.png')
