varshitha22 commited on
Commit
a2be647
·
verified ·
1 Parent(s): 719d090

Update pages/EDA.py

Browse files
Files changed (1) hide show
  1. pages/EDA.py +6 -6
pages/EDA.py CHANGED
@@ -161,13 +161,13 @@ avg_potassium = df['Potassium'].mean()
161
  # Function to plot bar charts
162
  def plot_nutrient_crops(data, title):
163
  crop_counts = data.value_counts()
164
- fig, ax = plt.subplots(figsize=(8, 3)) # Adjusted plot size for better display
165
  crop_counts.plot(kind='bar', color='skyblue', ax=ax)
166
- ax.set_xlabel('Crops', fontsize=10)
167
- ax.set_ylabel('Count', fontsize=10)
168
- ax.set_title(title, fontsize=10)
169
- ax.tick_params(axis='x', labelsize=10) # Adjust x-axis label size
170
- ax.tick_params(axis='y', labelsize=10) # Adjust y-axis label size
171
  st.pyplot(fig)
172
 
173
  # Plot: Crops in Nutrient-Rich Soil
 
161
  # Function to plot bar charts
162
  def plot_nutrient_crops(data, title):
163
  crop_counts = data.value_counts()
164
+ fig, ax = plt.subplots(figsize=(6, 3)) # Adjusted plot size for better display
165
  crop_counts.plot(kind='bar', color='skyblue', ax=ax)
166
+ ax.set_xlabel('Crops', fontsize=8)
167
+ ax.set_ylabel('Count', fontsize=8)
168
+ ax.set_title(title, fontsize=8)
169
+ ax.tick_params(axis='x', labelsize=8) # Adjust x-axis label size
170
+ ax.tick_params(axis='y', labelsize=8) # Adjust y-axis label size
171
  st.pyplot(fig)
172
 
173
  # Plot: Crops in Nutrient-Rich Soil