DebasishDhal99 commited on
Commit
d414425
·
1 Parent(s): e8adca5

Update channel_functions.py

Browse files
Files changed (1) hide show
  1. channel_functions.py +2 -2
channel_functions.py CHANGED
@@ -28,7 +28,7 @@ def individual_channel_image(img_arr, channel= 'r', ax=None):
28
  plt.imshow(cv2.cvtColor(img_arr,cv2.COLOR_BGR2RGB))
29
  else:
30
  plt.imshow(plot_arr, cmap = cmap)
31
- plt.colorbar(orientation= 'vertical', shrink = 0.7, pad = 0.01)
32
  plt.title('Image in the {} channel'.format(channel_name))
33
  plt.show()
34
 
@@ -49,7 +49,7 @@ def individual_channel_image(img_arr, channel= 'r', ax=None):
49
 
50
  def individual_channel_image_final(img_arr, channel='Red'):
51
  if channel in ['Red','Green','Blue']:
52
- fig, ax = plt.subplots(figsize = (10,10))
53
  individual_channel_image(img_arr, channel= channel)
54
  plt.show()
55
  fig.canvas.draw()
 
28
  plt.imshow(cv2.cvtColor(img_arr,cv2.COLOR_BGR2RGB))
29
  else:
30
  plt.imshow(plot_arr, cmap = cmap)
31
+ plt.colorbar(orientation= 'vertical', shrink = 0.7, pad = 0.01, fraction = 0.035,)
32
  plt.title('Image in the {} channel'.format(channel_name))
33
  plt.show()
34
 
 
49
 
50
  def individual_channel_image_final(img_arr, channel='Red'):
51
  if channel in ['Red','Green','Blue']:
52
+ fig, ax = plt.subplots(figsize = (15,10))
53
  individual_channel_image(img_arr, channel= channel)
54
  plt.show()
55
  fig.canvas.draw()