0
在一个情节,我想填充方框中指定通过如何在matplotlib中填充颜色的特定框?
LeftTop = (1, 2); LeftBottom = (1, 1);
RightTop = (2, 2); RightBottom = (2 ,1);
红色颜色。
怎么办?
在一个情节,我想填充方框中指定通过如何在matplotlib中填充颜色的特定框?
LeftTop = (1, 2); LeftBottom = (1, 1);
RightTop = (2, 2); RightBottom = (2 ,1);
红色颜色。
怎么办?
见参考: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")
希望它能帮助!