def powerplant_map():
with sns.axes_style('darkgrid'):
df = set_uncommon_fueltypes_to_other(Carma_ENTSOE_ESE_GEO_OPSD_WRI_matched_reduced())
shown_fueltypes = ['Hydro', 'Natural Gas', 'Nuclear', 'Hard Coal', 'Lignite', 'Oil']
df = df[df.Fueltype.isin(shown_fueltypes) & df.lat.notnull()]
fig, ax = plt.subplots(figsize=(7,5))
scale = 5e1
#df.plot.scatter('lon', 'lat', s=df.Capacity/scale, c=df.Fueltype.map(utils.tech_colors),
# ax=ax)
ax.scatter(df.lon, df.lat, s=df.Capacity/scale, c=df.Fueltype.map(tech_colors2))
ax.set_xlabel('')
ax.set_ylabel('')
draw_basemap()
ax.set_xlim(-13, 34)
ax.set_ylim(35, 71.65648314)
ax.set_axis_bgcolor('white')
fig.tight_layout(pad=0.5)
legendcols = pd.Series(tech_colors2).reindex(shown_fueltypes)
handles = sum(legendcols.apply(lambda x :
make_legend_circles_for([10.], scale=scale, facecolor=x)).tolist(), [])
fig.legend(handles, legendcols.index,
handler_map=make_handler_map_to_scale_circles_as_in(ax),
ncol=3, loc="upper left", frameon=False, fontsize=11)
return fig, ax
评论列表
文章目录