I'd like to change the number of columns in the legend so that there is only one row (ncol = number of groups).
To do so I thought I could take the ax returned from venn and use the method .get_legend_handles_labels() which I could pass to ax.legend to also specify ncol. However, ax.get_legend_handles_labels() returns two empty lists, which when passed to ax.legend cause the legend to disappear.
musicians = {
"Members of The Beatles": {"Paul McCartney", "John Lennon", "George Harrison", "Ringo Starr"},
"Guitarists": {"John Lennon", "George Harrison", "Jimi Hendrix", "Eric Clapton", "Carlos Santana"},
"Played at Woodstock": {"Jimi Hendrix", "Carlos Santana", "Keith Moon"}
}
ax = venn(musicians)
handles, labels = ax.get_legend_handles_labels()
ax.legend(handles, labels, ncol=3)

The potential work-around is to just pass the keys of the dictionary musicians to ax.legend and also specify ncol (this produces a figure as expected), but still not sure why ax.get_legend_handles_labels() doesn't work.
I'd like to change the number of columns in the legend so that there is only one row (ncol = number of groups).
To do so I thought I could take the
axreturned fromvennand use the method.get_legend_handles_labels()which I could pass toax.legendto also specifyncol. However,ax.get_legend_handles_labels()returns two empty lists, which when passed toax.legendcause the legend to disappear.The potential work-around is to just pass the keys of the dictionary
musicianstoax.legendand also specify ncol (this produces a figure as expected), but still not sure whyax.get_legend_handles_labels()doesn't work.