<human>:  How to change legend size with matplotlib.pyplot
<bot>: Here is some code to change legend font size with matplotlib.pyplot to 6

plot.legend(loc=2, prop={'size': 6})

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.