I'm happy to make the function public. I can see why people might want to use it to make their figures.

I think all the source code should be included in a supplementary file/folder. Part of the "reproducible research" ethos.