Python में Linear Modeling परिचय
Jason Vestuto
Data Scientist
import matplotlib.pyplot as plt
plt.plot(x, y, 'r-o')
plt.show()

# pyplot मॉड्यूल इम्पोर्ट करें
import matplotlib.pyplot as plt
# figure और axis ऑब्जेक्ट बनाएँ
fig, axis = plt.subplots()
# शुरुआती स्टाइल विकल्प तैयार करें
options = dict(marker='o', color='blue')
# axis ऑब्जेक्ट पर plot मेथड कॉल करें
line = axis.plot(x, y, **options)
# set मेथड्स से axis ऑब्जेक्ट संशोधित करें
_ = axis.set_ylabel('Times')
_ = axis.set_xlabel('Distances')
# figure दिखाएँ
plt.show()
(x1,y1) = (0,0)(x2,y2) = (2,3)dy = (y2 - y1) = 3 - 0dx = (x2 - x1) = 2 - 0slope = dy/dx = 3/2x=0: y1 = 0
Python में Linear Modeling परिचय