Forum Discussion
How can I print Japanese Characters via Python Visual?
- 6 years ago
iamriz ,
This is not the issue in power bi, if you create a dataframe and run the code this issue also occurs. You may haven't configured the matplotlibrc, please download the .ttf font file and move the file to matplotlib/mpl-data/fonts/ttf then configure font.family, font.sans-serif and axes.unicode_minus like below:
font.family : sans-serif font.sans-serif : add the ttf file name here axes.unicode_minus : FalseFinally run code below to reload the python environment:
from matplotlib.font_manager import _rebuild _rebuild() #reload一下Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
iamriz ,
This is not the issue in power bi, if you create a dataframe and run the code this issue also occurs. You may haven't configured the matplotlibrc, please download the .ttf font file and move the file to matplotlib/mpl-data/fonts/ttf then configure font.family, font.sans-serif and axes.unicode_minus like below:
font.family : sans-serif
font.sans-serif : add the ttf file name here
axes.unicode_minus : False
Finally run code below to reload the python environment:
from matplotlib.font_manager import _rebuild
_rebuild() #reload一下
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- iamriz6 years agoHelper II
Thanks, v-yuta-msft, sorry, my mistake I didn't check with pure python app using matplotlib.
Adding
plt.rcParams['font.sans-serif'] = ['MS Gothic', 'sans-serif']worked for me.