antoinecarme / pyaf

PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
BSD 3-Clause "New" or "Revised" License
459 stars 73 forks source link

Fix unicode font issues with matplotlib #81

Closed antoinecarme closed 1 year ago

antoinecarme commented 6 years ago

Following #76, PyAF plot contain empty boxes instead of unicode "characters".

image

antoinecarme commented 6 years ago

need t o find a way to force matplotlib to use a valid unicode font.

antoinecarme commented 2 years ago

https://github.com/matplotlib/matplotlib/pull/20740

image

antoinecarme commented 1 year ago

According to matplotlib issues wiht unicode, the default font families have to be defined before any kind of plotting.

the following code before building any pyaf model solves the unicode issues when plotting the time series (choose your favorite fonts, here are mine for chinese)

import matplotlib.pyplot as plt
plt.rcParams['font.family'] = ['Segoe UI Emoji', 'SimHei']
antoinecarme commented 1 year ago

image

antoinecarme commented 1 year ago

FIXED.