9951 explained code solutions for 126 technologies


python-matplotlibHow to draw 45° line


import matplotlib.pyplot as plt
plt.axline([0,0], [1,1])
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

axline

draws a line based on 2 points

[0,0]

first point

[1,1]

second point

.show()

render chart in a separate window