Commit 0419ea9f authored by Taddeüs Kroes's avatar Taddeüs Kroes

ImProc ass1: Replaced separate figures with subplots.

parent dc7c99bb
from pylab import clf, histogram, imshow, imread, bar, diff, xlim, show, \
figure, amin, amax
subplot, amin, amax
i = 1
def show_hist(a):
global i
figure(i)
subplot(2, 2, i)
imshow(a, vmin=0, vmax=1)
h, be = histogram(a.flatten(), bins=40)
figure(i + 1)
subplot(2, 2, i + 1)
bar(be[:-1], h, width=diff(be)[0])
xlim((0, 1))
i += 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment