plot_network: Extend plot title with line volume/cost
This commit is contained in:
parent
8d3127ff1a
commit
80d86487de
@ -249,8 +249,13 @@ ax.grid(True, axis="y", color='k', linestyle='dotted')
|
|||||||
|
|
||||||
#fig.tight_layout()
|
#fig.tight_layout()
|
||||||
|
|
||||||
fig.suptitle('Expansion to {lv} x today\'s line volume at {clusters} clusters'
|
ll = snakemake.wildcards.ll
|
||||||
.format(lv=snakemake.wildcards.lv, clusters=snakemake.wildcards.clusters))
|
ll_type = ll[0]
|
||||||
|
ll_factor = ll[1:]
|
||||||
|
lbl = dict(c='line cost', v='line volume')[ll_type]
|
||||||
|
amnt = '{lv} x today\'s'.format(ll_factor) if ll_factor != 'opt' else 'optimal'
|
||||||
|
fig.suptitle('Expansion to {amount} {label} at {clusters} clusters'
|
||||||
|
.format(amount=amnt, label=lbl, clusters=snakemake.wildcards.clusters))
|
||||||
|
|
||||||
fig.savefig(snakemake.output.ext, transparent=True,
|
fig.savefig(snakemake.output.ext, transparent=True,
|
||||||
bbox_inches='tight', bbox_extra_artists=[l1, l2, l3, ax1, ax2])
|
bbox_inches='tight', bbox_extra_artists=[l1, l2, l3, ax1, ax2])
|
||||||
|
Loading…
Reference in New Issue
Block a user