aliicemill commited on
Commit
964e384
·
verified ·
1 Parent(s): fa085c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -95,7 +95,7 @@ def run_turkish():
95
  # Grafik oluşturma
96
  st.subheader("Not Dağılım Grafiği")
97
  unique_values, counts = np.unique(notes_result, return_counts=True)
98
- plt.figure(figsize=(10, 6))
99
  bars = plt.bar(unique_values, counts, width=0.3)
100
  plt.axvline(x=average_x, color='red', linestyle='--')
101
  plt.text(average_x + 1.5, max(counts), 'Ortalama Not', color='red', rotation=0, ha='center', va='bottom')
@@ -144,13 +144,15 @@ def run_turkish():
144
  va="top",
145
  transform=plt.gca().transAxes # Koordinatları grafiğe göre ayarla
146
  )
147
-
 
 
148
  # Grafik gösterimi
149
  st.pyplot(plt)
150
 
151
  # Grafik indirme bağlantısı
152
  buf = BytesIO()
153
- plt.savefig(buf, format="png")
154
  buf.seek(0)
155
  st.download_button(
156
  label="Grafiği İndir",
 
95
  # Grafik oluşturma
96
  st.subheader("Not Dağılım Grafiği")
97
  unique_values, counts = np.unique(notes_result, return_counts=True)
98
+ plt.figure(figsize=(10, 6),dpi=150)
99
  bars = plt.bar(unique_values, counts, width=0.3)
100
  plt.axvline(x=average_x, color='red', linestyle='--')
101
  plt.text(average_x + 1.5, max(counts), 'Ortalama Not', color='red', rotation=0, ha='center', va='bottom')
 
144
  va="top",
145
  transform=plt.gca().transAxes # Koordinatları grafiğe göre ayarla
146
  )
147
+ # Kenar boşluklarını optimize et
148
+ plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9)
149
+
150
  # Grafik gösterimi
151
  st.pyplot(plt)
152
 
153
  # Grafik indirme bağlantısı
154
  buf = BytesIO()
155
+ plt.savefig(buf, format="png",bbox_inches='tight')
156
  buf.seek(0)
157
  st.download_button(
158
  label="Grafiği İndir",