LakshmiHarika commited on
Commit
0e7eb4d
·
verified ·
1 Parent(s): ef6fe9b

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. 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=(8, 2), facecolor='none') # Set transparent facecolor
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=10, color='red') # Add labels in red
427
  ax.set_yticks([]) # Remove y-axis ticks
428
- ax.set_title("Grayscale Representation", fontsize=12)
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)