3

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.

1 Answers1

1

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

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Yi-Der Lin
  • 11
  • 1