matplotlib: 領域を塗りつぶす | sheldon cooper 2.0のブログ

sheldon cooper 2.0のブログ

ブログの説明を入力します。


- (axhspan(ymin, ymax), axvspan(xmin, xmax) )
http://matplotlib.org/api/pyplot_api.html

or

- Rectangle
fig = plt.figure()
ax = fig.add_subplot(111)
rect1 = matplotlib.patches.Rectangle((-200,-100), 400, 200, color='yellow')
circle1 = matplotlib.patches.Circle((-200,-250), radius=90, color='#EB70AA')
ax.add_patch(rect1)
ax.add_patch(circle1)
plt.xlim([-400, 400])
plt.ylim([-400, 400])
plt.show()

http://stackoverflow.com/questions/10550477/how-do-i-set-color-to-rectangle-in-matplotlib