Python ile Doğrusal Modellemenin Temelleri
Jason Vestuto
Data Scientist
import matplotlib.pyplot as plt
plt.plot(x, y, 'r-o')
plt.show()

# pyplot modülünü içe aktar
import matplotlib.pyplot as plt
# Figure ve axis nesnelerini oluştur
fig, axis = plt.subplots()
# İlk stil seçeneklerini hazırla
options = dict(marker='o', color='blue')
# axis nesnesinde plot metodunu çağır
line = axis.plot(x, y, **options)
# set metodlarıyla axis'i düzenle
_ = axis.set_ylabel('Zamanlar')
_ = axis.set_xlabel('Mesafeler')
# Figure'ı göster
plt.show()
(x1,y1) = (0,0)(x2,y2) = (2,3)dy = (y2 - y1) = 3 - 0dx = (x2 - x1) = 2 - 0slope = dy/dx = 3/2x=0 iken: y1 = 0
Python ile Doğrusal Modellemenin Temelleri