You can change legend size in Matplotlib with the following code. If you want to learn Python then I will highly recommend you to read This Book.
![How to change legend size in Matplotlib](https://aihints.com/wp-content/uploads/2022/03/How-to-change-legend-size-in-Matplotlib.png)
from matplotlib import pyplot as plt x = [1,2,3,4,5] y = [2,4,6,8,10] z = [4,8,12,16,20] plt.title("Integers and Multiple") plt.xlabel("Integers") plt.ylabel("Multiple") plt.plot(x,y,label="Between X and Y") plt.plot(x,z,label="Between X and Z") plt.legend(loc=2, prop={'size': 15}) plt.savefig('figure.png') plt.show()
![](https://aihints.com/wp-content/uploads/2022/03/figure-32.png)
People are also reading:
What is Computer Vision? Examples, Applications, Techniques
Top 10 Computer Vision Books with Python
Books for Machine Learning (ML)