Informatics Practices
Which argument will you provide to change the following in a line chart ?
(i) width of the line
(ii) color of the line
PyPlot
2 Likes
Answer
(i) For changing the width of the line, we use the linewidth argument with the plot() function as: <matplotlib.pyplot>.plot(<data1>, [,data2], linewidth = <width> )
(ii) For changing the color of the line, we use the color argument with the plot() function as: <matplotlib.pyplot>.plot(<data1>, [,data2], <color code>)
Answered By
2 Likes