Grafikleri özelleştirme

Matplotlib ile Veri Görselleştirmeye Giriş

Ariel Rokem

Data Scientist

Veri görünümünü özelleştirme

ax.plot(seattle_weather["MONTH"], 
        seattle_weather["MLY-PRCP-NORMAL"])
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

İşaretçi ekleme

ax.plot(seattle_weather["MONTH"], 
        seattle_weather["MLY-PRCP-NORMAL"], 
        marker="o")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

İşaretçi seçimi

ax.plot(seattle_weather["MONTH"], 
        seattle_weather["MLY-PRCP-NORMAL"], 
        marker="v")
plt.show()

https://matplotlib.org/api/markers_api.html

Matplotlib ile Veri Görselleştirmeye Giriş

Çizgi stilini ayarlama

fig, ax = plt.subplots()
ax.plot(seattle_weather["MONTH"], 
        seattle_weather["MLY-TAVG-NORMAL"],
        marker="v", linestyle="--")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Çizgileri linestyle ile kaldırma

fig, ax = plt.subplots()
ax.plot(seattle_weather["MONTH"], 
        seattle_weather["MLY-TAVG-NORMAL"],
        marker="v", linestyle="None")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Renk seçimi

fig, ax = plt.subplots()
ax.plot(seattle_weather["MONTH"], 
        seattle_weather["MLY-TAVG-NORMAL"],
        marker="v", linestyle="--", color="r")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Eksen etiketlerini özelleştirme

ax.set_xlabel("Zaman (ay)")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Y ekseni etiketini ayarlama

ax.set_xlabel("Zaman (ay)")
ax.set_ylabel("Ortalama sıcaklık (Fahrenheit)")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Başlık ekleme

ax.set_title("Seattle'da hava durumu")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Grafiklerinizi özelleştirme alıştırması

Matplotlib ile Veri Görselleştirmeye Giriş

Preparing Video For Download...