martijnvermaat / calmap

Calendar heatmaps from Pandas time series data -- See https://github.com/MarvinT/calmap/ for the maintained version
https://pythonhosted.org/calmap
MIT License
211 stars 61 forks source link

Font is causing trouble in Linux cronjobs #38

Open bonedi opened 2 years ago

bonedi commented 2 years ago

If I use your calmap function on my Linux Red Hat Enterprise distribution, I'll get the warning findfont: Font family ['Arial'] not found. Falling back to DejaVu Sans. Normally the warning will be just ignored, but if executed in the context of a cronjob it will cause the job to exit. In your code the Font is defined in Line 308:

ylabel_kws = dict(
        fontsize=32,
        color=kwargs.get('fillcolor', 'whitesmoke'),
        fontweight='bold',
        fontname='Arial',
        ha='center')

Could this be changed to fontfamily = 'serif' or to a parameter?

Since I don't have admin rights on this machine there is no way for me to just install the missing Font.