plotly / Kaleido

Fast static image export for web-based visualization libraries with zero dependencies
MIT License
378 stars 38 forks source link

cannot display character character in static image #157

Open williamay53 opened 1 year ago

williamay53 commented 1 year ago

Hi,

I find that I cannot write chinese character in static image, e.g. I have the following code:

`import plotly.express as px

df = px.data.gapminder().query("country=='Canada'") fig = px.line(df, x="year", y="lifeExp", title="測試") fig.write_image('test_chinese_character.png')`

the result is as follows:

test_chinese_character

williamay53 commented 1 year ago

I am using ubuntu 22.04.1 LTS, python3, plotly v5.10.0 and kaleido v0.2.1

Jaorow commented 9 months ago

@williamay53 any solution found? I am having the same error with plotty 5.18.0 and this line:

plotly.io.write_image(fig, temp_file+"/t.png", format="png")
DCRcoder commented 8 months ago

i got same problem. is there some solution about it.

williamay53 commented 8 months ago

I am using ubuntu, I install language pack using the following command to solve

sudo apt-get install language-pack-zh sudo apt-get install chinese

gvwilson commented 4 months ago

Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson

dkettchen commented 2 months ago

having this same issue with exporting a table containing japanese characters, looking forward to the solution (may try williamay53's installing language packages solution later for now 🙌 edit: tried installing japanese language packs, didn't fix it, still just showing up as boxes 😐)