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

Update pages/EDA.py

Browse files
Files changed (1) hide show
  1. pages/EDA.py +5 -5
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=(10, 5)) # Adjusted plot size for better display
165
  crop_counts.plot(kind='bar', color='skyblue', ax=ax)
166
- ax.set_xlabel('Crops', fontsize=6)
167
- ax.set_ylabel('Count', fontsize=6)
168
  ax.set_title(title, fontsize=10)
169
- ax.tick_params(axis='x', labelsize=6) # Adjust x-axis label size
170
- ax.tick_params(axis='y', labelsize=6) # 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=(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