How to avoid this code duplication?

Solved using multiple dispatch, see makie_addsubplot.