Spaces:
Sleeping
Sleeping
Update pages/EDA.py
Browse files- 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=(
|
| 165 |
crop_counts.plot(kind='bar', color='skyblue', ax=ax)
|
| 166 |
-
ax.set_xlabel('Crops', fontsize=
|
| 167 |
-
ax.set_ylabel('Count', fontsize=
|
| 168 |
-
ax.set_title(title, fontsize=
|
| 169 |
-
ax.tick_params(axis='x', labelsize=
|
| 170 |
-
ax.tick_params(axis='y', labelsize=
|
| 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
|