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?
问问题
450 次
1 回答
2
所有imshow
的情节都是为了填充情节的空间而设计的(“im”是image的缩写,images填充情节空间),这与你想要绘制圆圈的愿望不一致。
网格中的散点图将是通往圆形网格的简单路线。这是一个例子:
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()
于 2013-08-03T16:15:34.353 回答