0

I'm trying to export a chart made with plotly but after 10 minutes running still doesn't output anything. Does anybody know what am I doing wrong?

Cheers!

import plotly.express as px
import plotly.io as pio
import plotly
import pandas as pd

pio.renderers.default='browser'


root = path
df = pd.read_csv(path + \\charts.csv')

fig = px.histogram(df, x="score_round")

fig.update_layout(bargap=0.30)

pio.write_image(fig, root, format='png')
fig.show()
  • How large is your `df`? – Derek O Feb 25 '22 at 15:51
  • A bit large, around 1 million observations. Perhaps there is the problem? I can generate the graph and visualize it in a browser (i'm with Spyder so visualizations in a browser are easier). – Eleanor Abernathy Feb 26 '22 at 12:32
  • Does this answer your question? [Unable to export plotly images to png with Kaleido](https://stackoverflow.com/questions/69016568/unable-to-export-plotly-images-to-png-with-kaleido) – Voodu May 07 '23 at 22:21

0 Answers0