Legend entries ordered horizontally with pyplot()

Hi,

Is there a way to list the legend entries horizontally, next to each other, instead of one under each other?

Thanks

pyplot is simply matplotlib under the hood, so you can simply do a search based on that which turns up this:

https://stackoverflow.com/questions/10101141/matplotlib-legend-add-items-across-columns-instead-of-down

There is an ‘ncol’ argument and i would think that making it equal to the number of items in the legend will do what you want.