最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Preventing warping when using FontAwesome icons and Pywaffle - Stack Overflow

programmeradmin3浏览0评论

After running the example code provided in the documentation

import matplotlib.pyplot as plt
from pywaffle import Waffle

fig = plt.figure(
    FigureClass=Waffle,
    rows=5,
    values=[30, 16, 4],
    colors=["#FFA500", "#4384FF", "#C0C0C0"],
    icons=['sun', 'cloud-showers-heavy', 'snowflake'],
    font_size=20,
    icon_style='solid',
    icon_legend=True,
    legend={
        'labels': ['Sun', 'Shower', 'Snow'], 
        'loc': 'upper left', 
        'bbox_to_anchor': (1, 1)
    }
)

With the aim of achieving this chart I get a very warped output

Trying various versions of the packages and registering the fontawesome fonts manually does not seem to solve it

发布评论

评论列表(0)

  1. 暂无评论