Ejemplo n.º 1
0
                                   network='elec',
                                   simpl='',
                                   clusters='5',
                                   ll='copt',
                                   opts='Co2L-24H',
                                   attr='p_nom',
                                   ext="pdf")
    configure_logging(snakemake)

    set_plot_style()

    opts = snakemake.config['plotting']
    map_figsize = opts['map']['figsize']
    map_boundaries = opts['map']['boundaries']

    n = load_network_for_plots(snakemake.input.network,
                               snakemake.input.tech_costs, snakemake.config)

    scenario_opts = snakemake.wildcards.opts.split('-')

    fig, ax = plt.subplots(figsize=map_figsize,
                           subplot_kw={"projection": ccrs.PlateCarree()})
    plot_map(n, ax, snakemake.wildcards.attr, opts)

    fig.savefig(snakemake.output.only_map, dpi=150, bbox_inches='tight')

    ax1 = fig.add_axes([-0.115, 0.625, 0.2, 0.2])
    plot_total_energy_pie(n, ax1)

    ax2 = fig.add_axes([-0.075, 0.1, 0.1, 0.45])
    plot_total_cost_bar(n, ax2)
Ejemplo n.º 2
0
                                   simpl='',
                                   clusters='5',
                                   ll='copt',
                                   opts='Co2L-24H',
                                   attr='p_nom',
                                   ext="pdf")
    configure_logging(snakemake)

    set_plot_style()

    paths, config, wildcards, logs, out = retrieve_snakemake_keys(snakemake)

    map_figsize = config['map']['figsize']
    map_boundaries = config['map']['boundaries']

    n = load_network_for_plots(paths.network, paths.tech_costs, config)

    scenario_opts = wildcards.opts.split('-')

    fig, ax = plt.subplots(figsize=map_figsize,
                           subplot_kw={"projection": ccrs.PlateCarree()})
    plot_map(n, ax, wildcards.attr, config)

    fig.savefig(out.only_map, dpi=150, bbox_inches='tight')

    ax1 = fig.add_axes([-0.115, 0.625, 0.2, 0.2])
    plot_total_energy_pie(n, ax1)

    ax2 = fig.add_axes([-0.075, 0.1, 0.1, 0.45])
    plot_total_cost_bar(n, ax2)