Etiketler ve açıklamalar

Python ile Veri Bilimine Giriş

Hillary Green-Lerman

Lead Data Scientist, Looker

Az önce neyi çizdirdik?

from matplotlib import pyplot as plt

plt.plot(ransom.letter,
         ransom.frequency)

plt.show()

Python ile Veri Bilimine Giriş

Eksen ve başlık etiketleri

plt.xlabel("Letter")
plt.ylabel("Frequency")
plt.title("Ransom Note Letters")

Etiketleri plt.show()'dan önce herhangi bir yerde ekleyin

Python ile Veri Bilimine Giriş

Açıklama kutuları

plt.plot(aditya.days,
         aditya.cases,
         label="Aditya")
plt.plot(deshaun.days,
         deshaun.cases,
         label="Deshaun")
plt.plot(mengfei.days,
         mengfei.cases,
         label="Mengfei")
plt.legend()

Python ile Veri Bilimine Giriş

Serbest metin

plt.text(xcoord,
    ycoord,
    "Text Message")
plt.text(5,
    9,
    "Unusually low H frequency!")

Python ile Veri Bilimine Giriş

Metni değiştirme

  • Yazı tipi boyutunu değiştirin
    plt.title("Plot title", fontsize=20)
    
  • Yazı rengi değiştirin
    plt.legend(color="green")
    

https://en.wikipedia.org/wiki/Web_colors

Python ile Veri Bilimine Giriş

Hadi pratik yapalım!

Python ile Veri Bilimine Giriş

Preparing Video For Download...