Küçük çoklular

Matplotlib ile Veri Görselleştirmeye Giriş

Ariel Rokem

Data Scientist

Veri ekleme

ax.plot(seattle_weather["MONTH"], 
        seattle_weather["MLY-PRCP-NORMAL"], 
        color='b')
ax.set_xlabel("Zaman (ay)")
ax.set_ylabel("Yağış (inç)")
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Daha fazla veri ekleme

ax.plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-25PCTL"], 
        linestyle='--', color='b')
ax.plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-75PCTL"], 
        linestyle='--', color=color)
plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Ve daha fazla veri

ax.plot(austin_weather["MONTH"], austin_weather["MLY-PRCP-NORMAL"],
        color='r')
ax.plot(austin_weather["MONTH"], austin_weather["MLY-PRCP-25PCTL"], 
        linestyle='--', color='r')
ax.plot(austin_weather["MONTH"], austin_weather["MLY-PRCP-75PCTL"], 
        linestyle='--', color='r')
plt.show()
Matplotlib ile Veri Görselleştirmeye Giriş

Çok fazla veri!

Matplotlib ile Veri Görselleştirmeye Giriş

plt.subplots ile küçük çoklular

fig, ax = plt.subplots()
fig, ax = plt.subplots(3, 2)

plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Alt grafiklere veri ekleme

ax.shape
(3, 2)
ax[0, 0].plot(seattle_weather["MONTH"], 
              seattle_weather["MLY-PRCP-NORMAL"], 
              color='b')

plt.show()

Matplotlib ile Veri Görselleştirmeye Giriş

Verili alt grafikler

fig, ax = plt.subplots(2, 1)

ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-NORMAL"], color='b') ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-25PCTL"], linestyle='--', color='b') ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-75PCTL"], linestyle='--', color='b')
ax[1].plot(austin_weather["MONTH"], austin_weather["MLY-PRCP-NORMAL"], color='r') ax[1].plot(austin_weather["MONTH"], austin_weather["MLY-PRCP-25PCTL"], linestyle='--', color='r') ax[1].plot(austin_weather["MONTH"], austin_weather["MLY-PRCP-75PCTL"], linestyle='--', color='r')
ax[0].set_ylabel("Yağış (inç)") ax[1].set_ylabel("Yağış (inç)")
ax[1].set_xlabel("Zaman (ay)")
plt.show()
Matplotlib ile Veri Görselleştirmeye Giriş

Verili alt grafikler

Matplotlib ile Veri Görselleştirmeye Giriş

Y-ekseni aralığını paylaşma

fig, ax = plt.subplots(2, 1, sharey=True)

Matplotlib ile Veri Görselleştirmeye Giriş

Alt grafik oluşturma alıştırması!

Matplotlib ile Veri Görselleştirmeye Giriş

Preparing Video For Download...