TutteInstitute/datamapplot

Font for labels

exrhizo opened this issue · 3 comments

Hi, this is great, I found the ML Arxiv Map

Something that I think could improve readability of the labels is:

image

I think the font you are using is a title font, but as it gets smaller size, the narrow stems are hard to read, maybe a sans-serif could improve the hierarchy?

The font is selectable as a parameter. You can specify any font that is on google-font and it should work. If you check the example you chould be able to swap in any font you like and generate your own.

somewhat related question: how can one add a font from a local .tff file?

For the interactive plots that isn't really possible right now unfortunately -- you would need to embed the font into the HTML somehow. That is something you could potentially to afterwards to the HTML file, but that's definitely a non-trivial task.

For static plots if you install the font and ensure it is accessible to matplotlib then you should be able to just use it.