laserson / squarify

Pure Python implementation of the squarify treemap layout algorithm
Other
293 stars 36 forks source link

Label font size adjust? #19

Closed KangboLu closed 5 years ago

KangboLu commented 5 years ago

Treemap is a great package to use.

Is there any way to adjust the font size inside each treemap block?

And is there any way to handle label text outside of the block?

laserson commented 5 years ago

You can pass arguments to the underlying matplotlib.Axes.text through text_kwargs as specified in the docstring. Otherwise, you can manipulate the figure as if it's any other matplotlib figure (including adding additional text where you want). Alternatively, it's not so hard to build your own figure from scratch. (And you can look at the code for plot as a guide...it's relatively simple.)