Stay With us
3 new comments

beginner
new

Help & Settings
About
Help
Tips

How i can increase the width of line of legend in matplotlib

I am learning matplotlib in python. I want to increase the width of line that shows up with the legend. How can i do this

from matplotlib import pyplot as plt
days = [1,2,3,4,5]
sleeping = [7,8,6,11,7]
plt.plot(days, sleeping, color='m', label='Sleeping')
plt.xlabel("Days")
plt.ylabel("Sleeping")
plt.title("Sleep Graph")
plt.show()

(0) Replies

Please login or register to Comment or Answer