I try to create a plot having 3x3 subplots (each having the same 8 lines), where I want to create two legends (4 lines per legend) underneath in the whole figure. I tried using the answers given here: how do I make a single legend for many subplots with matplotlib? and here: How to put the legend out of the plot
However, as soon as I try to set one legend belowusing the following line of python, the figure is visually expanded but the legend does not seem to be drawn:
f.legend((p1, p2, p3, p4), labels=labels, loc=(0, -0.1), title='Legend title 1', ncol=4)
Using the following commandine, the legend is drawn but within the figure:
f.legend((p1, p2, p3, p4), labels=labels, loc='lower center', title='Legend title 1', ncol=4)