matplotlib bar图中充满黑色纹理



如何填充黑色纹理以区分棒在matplotlib中不使用颜色?我找不到任何例子。就像R

中的此纹理一样

matplotlib.pyploy.bar对象具有属性hatch,它控制着您所追求的东西。

查看文档以获取更多信息https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.bar.html

Matplotlib文档中有一个非常不错的例子。https://matplotlib.org/examples/pylab_examples/hatch_demo.html

您可能需要调整示例以匹配您的特定Neads。

最新更新