0

在一个情节中,我希望填充一个由

LeftTop = (1, 2); LeftBottom = (1, 1);
RightTop = (2, 2); RightBottom = (2 ,1);

红色

怎么做?

4

1 回答 1

0

请参阅参考: http: //matplotlib.org/api/artist_api.html#matplotlib.patches.Rectangle

和这里:

import matplotlib.patches as mpatches

LeftBottom = (1, 1)
rect = mpatches.Rectangle(LeftBottom, 2, 1, color = "red")

希望能帮助到你!

于 2013-10-11T10:11:28.960 回答