chevron_left
Customizing Plots Cookbook
0
0
0
new
Changing line width in Matplotlib
Programming
chevron_rightPython
chevron_rightMatplotlib
chevron_rightCookbooks
chevron_rightCustomizing Plots Cookbook
schedule Mar 9, 2022
Last updated Python●Matplotlib
Tags tocTable of Contents
expand_more We can change the line width in Matplotlib by specifying the keyword-argument linewidth
:
x = [1,2,3]y1 = [1,2,3]y2 = [2,4,6]
plt.plot(x, y1, linewidth=1)plt.plot(x, y2, linewidth=5)plt.show()
This produces the following output:

Published by Arthur Yanagisawa
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...