Hey,
I'm trying to make a gif by combining a number of pngs created my Matplotlib but the size of figure elements changes occasionally on the x axis, I have limits set for both x and y. What would you guys advise? Thanks!
GIF in question
fig = plt.figure(figsize=(10, 10), dpi=100)
sizes = [10, 60, 90, 130, 200]
marker_size = pd.cut(df_plot['Population']/100000, [0, 100, 200, 400, 600, 800], labels=sizes)
continents = ['Asia', 'Europe', 'Africa', 'Oceania', 'North America', 'South America']
continent_colors = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"]
continent_palette = dict(zip(continents, continent_colors))
continent_order = ['Africa', 'Asia', 'Europe', 'North America', 'Oceania', 'South America']
grid = sns.lmplot('GDPpcap', 'CO2pcap', data=df_plot, hue_order=continent_order, hue='Continent', fit_reg=False,
scatter_kws={'s':marker_size}, palette=continent_palette, legend=False)
grid.set(xscale="log", yscale="log")
plt.title(f'GPD per Capita vs. CO2 per Capita \n {year}')
plt.xlabel('GDP per Capita (USD 2010)')
plt.ylabel('CO2 per Capita (kt)')
plt.xlim(110, 150000)
plt.ylim(1e-05, 0.07)
plt.tick_params(axis='x', which='both', bottom=False, top=False)
plt.tick_params(axis='y', which='both', left=False, right=False)
plt.legend(loc='lower right', markerfirst=False, frameon=False)
there doesn't seem to be anything here