在Matplotlib中,我可以通过以下方式在框中绘制换行文本
ax.text(x_coord, y_coord, string, bbox = dict(boxstyle='round'), wrap = True, fontproperties = FontProperties_object)
我也可以通过matplotlib.font_manager.FontProperties设置字体类型。
与squarify相比,它看起来很相似,因为正方形中有文本。如何使用squarify设置字体和文本换行?谢谢。
发布于 2019-02-25 16:15:14
我试过了,它起作用了。
text_kwargs={"fontproperties": FontProperties_object}。文本选项以'dict‘的形式给出,如中所述
https://github.com/laserson/squarify/blob/master/squarify/.py
https://stackoverflow.com/questions/50662007
复制相似问题