Commit 938ad5af authored by ulrich_y's avatar ulrich_y
Browse files

Fixed legends for multi-plot

parent 26cac9fe
......@@ -432,15 +432,29 @@ def kplot(sigma, labelx='$x_e$', labelsigma=None,
axs[2].tick_params(labelcolor=orderscheme['nnlo'], axis='y')
axs[1].axhline(1, color='black', linewidth=0.4, zorder=1)
plegend = list(zip(*[
plegend = [
(
matplotlib.lines.Line2D([0], [0], color=orderscheme[i]),
legend[i]
)
for i in sorted(list(set(orders[i] for i in show+showk)))
if i in legend
]))
]
if 'nlo2' in sigma and 'nlo2' in legend:
plegend.append((
matplotlib.lines.Line2D([0], [0], color=orderscheme['nlo'], linestyle=linestyle2),
legend['nlo2']
))
if 'nnlo2' in sigma and 'nnlo2' in legend:
plegend.append((
matplotlib.lines.Line2D([0], [0], color=orderscheme['nnlo'], linestyle=linestyle2),
legend['nnlo2']
))
plegend = list(zip(*plegend))
what = {
'fig': fig, 'u': axs[0], 'l': axs[1]
}[legendopts.pop('what', 'u')]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment