I have a smallish matrix and I want to do imshow with it with interpolation='nearest'. But this makes discrete square blocks. Is it possible to make the blocks circular and also control the size of the block?
1 Answer
All imshow plots are designed to fill the space of the plots ("im" is short for image and images fill the plot space), which is inconsistent with your desire to plot circles.
A scatter plot in a grid would be an easy route to a grid of circle. Here's an example:

from pylab import *
N = 10
r0 = 0.6
x = linspace(0, 1, 10)
y = linspace(0, 1, 10)
X, Y = meshgrid(x, y)
size = rand(N,N)
c = size
scatter(X,Y,s=700*size, marker='o', c=c)
show()
You can get more control if you use plotting primitives. Two such examples from the matplolib gallery are here and here.
interpolation='nearest'...