I have code for segmentation of spine and ribs, I would like to segmented all parts, but always when for loop ends there is only one part of segmentation (one plot). Like this:
and so on.
But I would like to all segmented parts in this image (all yellow plots). I tried something like hold on, but it didn´t work. Can you advise me?
I attach my code and original image. Thank you for your answers.