Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +3 -3
pages/Data Collection.py
CHANGED
|
@@ -420,12 +420,12 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 420 |
gradient = np.tile(gradient, (10, 1)) # Repeat the gradient to make it visually clear
|
| 421 |
|
| 422 |
# Plot the gradient
|
| 423 |
-
fig, ax = plt.subplots(figsize=(
|
| 424 |
ax.imshow(gradient, cmap='gray', aspect='auto')
|
| 425 |
ax.set_xticks(np.linspace(0, 255, 11)) # Set ticks for every 25.5 (0, 25, ..., 255)
|
| 426 |
-
ax.set_xticklabels([str(int(x)) for x in np.linspace(0, 255, 11)], fontsize=
|
| 427 |
ax.set_yticks([]) # Remove y-axis ticks
|
| 428 |
-
ax.set_title("Grayscale Representation", fontsize=
|
| 429 |
|
| 430 |
# Save the figure with a transparent background
|
| 431 |
plt.savefig('grayscale_representation.png', transparent=True)
|
|
|
|
| 420 |
gradient = np.tile(gradient, (10, 1)) # Repeat the gradient to make it visually clear
|
| 421 |
|
| 422 |
# Plot the gradient
|
| 423 |
+
fig, ax = plt.subplots(figsize=(4, 1), facecolor='none') # Decreased figsize for half size
|
| 424 |
ax.imshow(gradient, cmap='gray', aspect='auto')
|
| 425 |
ax.set_xticks(np.linspace(0, 255, 11)) # Set ticks for every 25.5 (0, 25, ..., 255)
|
| 426 |
+
ax.set_xticklabels([str(int(x)) for x in np.linspace(0, 255, 11)], fontsize=8, color='red') # Smaller font
|
| 427 |
ax.set_yticks([]) # Remove y-axis ticks
|
| 428 |
+
ax.set_title("Grayscale Representation", fontsize=10)
|
| 429 |
|
| 430 |
# Save the figure with a transparent background
|
| 431 |
plt.savefig('grayscale_representation.png', transparent=True)
|