Hi to all,
I am not able to download a geo scatter plot into an image.
My code is :
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
from datetime import timedelta
import numpy as np
from matplotlib.ticker import MaxNLocator
import dataframe_image as dfi
import plotly.express as px
import kaleido
import plotly.io as pio
from IPython.display import Image
import datetime as dt
df_loc = pd.read_csv(’./Excels/Projectes.csv’, delimiter=’,’)
d_loc = df_loc[[‘Name’,‘Assign’,‘Phase Date’, ‘Final Date’, ‘Property’,‘Status’,‘Status2’,‘Location’,‘Budget’]]
df_loc = df_loc[[“Name”,“Location”,“Budget”]]
fig = px.scatter_geo(df_loc, locations=“Location”, color = “Name”, size = “Budget”)
fig.write_image(“Images/Location_automatica.jpeg”)
#fig.show()
If I unncomment fig.show, the plot shows in a local browser but if I try to “write_image” the proram does not stop. It seems like it is in a bucle.
Any suggestions ?
Thanks in advance.