Reputation:
In Matplotlib, I can plot a wrapped-text inside a box by
ax.text(x_coord, y_coord, string, bbox = dict(boxstyle='round'), wrap = True, fontproperties = FontProperties_object)
I can also set the font type through matplotlib.font_manager.FontProperties
.
Compared to squarify
, it looks similar because there is text inside a square. How would I set the font and do text-wrapping with squarify
? Thanks.
Upvotes: 3
Views: 1287
Reputation: 11
I tried this and it works.
text_kwargs={"fontproperties": FontProperties_object}
. The text options are given as 'dict' as mentioned in
https://github.com/laserson/squarify/blob/master/squarify/init.py
Upvotes: 1