Replace stat with after_stat see -
bandle::spatial2D(msnset, bandleres) + labs(colour = "Subcellular compartment")
Warning message:
`stat(level)` was deprecated in ggplot2 3.4.0.
ℹ Please use `after_stat(level)` instead.
ℹ The deprecated feature was likely used in the bandle package.
Replace
statwithafter_statsee -