https://github.com/oulib-resdata/PlotInR/blob/ebe6613dd24e820ff312397fa997361f49e616c7/extended_visualization_in_ggplot2.R#L452