Every line of 'plt legend outside' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
251 def legend(self, ax, lines=(), labels=(), legend_loc="best"): 252 ax.legend( 253 lines, 254 labels, 255 title=None, 256 loc=legend_loc, 257 frameon=False, 258 ncol=1, 259 labelspacing=0.5, 260 columnspacing=1, 261 borderpad=1, 262 handlelength=2, 263 fontsize=12, 264 ) 265 return ax
325 def legend(*args, **kwargs): 326 kwargs.setdefault('framealpha', 0.2) 327 try: 328 plt.legend(*args, **kwargs) 329 except: 330 warnings.warn("framealpha not effective") 331 kwargs.pop('framealpha') 332 plt.legend(*args, **kwargs)