9951 explained code solutions for 126 technologies

python-matplotlibHow to change line color

import matplotlib.pyplot as plt
plt.plot([1,2,10,6,15,3,4], color='orange')
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities


plot specified data


values to use for first line


set line color


use orange color from named colors for our line


render chart in a separate window