Python ile Öngörücü Analitiğe Giriş
Nele Verbiest, Ph.D
Data Scientist @PythonPredictions

import matplotlib.pyplot as plt import numpy as np# Grafiği çiz pig_table["Incidence"].plot()# Grup adlarını göster plt.xticks(np.arange(len(pig_table)), pig_table["income"])# Grup adlarını ortala width = 0.5 plt.xlim([-width, len(pig_table)-width])plt.ylabel("Incidence", rotation = 0, rotation_mode="anchor", ha = "right") plt.xlabel("Income") plt.show()

import matplotlib.pyplot as plt import numpy as np # Grafiği çizplt.ylabel("Size", rotation = 0,rotation_mode="anchor", ha = "right" )pig_table["Incidence"].plot(secondary_y = True)pig_table["Size"].plot(kind='bar', width = 0.5, color = "lightgray", edgecolor = "none") ## Çubuklar ekle# Grup adlarını göster plt.xticks(np.arange(len(pig_table)), pig_table["income"]) # Grup adlarını ortala plt.xlim([-0.5, len(pt)-0.5]) plt.ylabel("Incidence", rotation = 0, rotation_mode="anchor", ha = "right" plt.xlabel("Income") plt.show()

Python ile Öngörücü Analitiğe Giriş