Structure of several completely different types of plots in one function is a bad idea, even if it allows some code sharing. Hard to see at a glance which code belongs to which plot style.
Every added functionality that needs passing parameters to the loop or finish function needs changes at several points.
Code sharing can still be done by putting common things in their extra functions. These can be made "private" when using a class with static methods instead of one mega function directly in the module.
Class still allows structuring of all high-dimensional plotting styles under one umbrella (a class with static methods instead of a single function).
Class instances allow possibility for re-using pre-computed information, and may offer other benefits in the future.
Call signature changes from plot_highdim(data, style='corner') to no more than e.g. HighdimPlots.corner(data).
Especially
plot_highdim
needs refactoring:loop
orfinish
function needs changes at several points.plot_highdim(data, style='corner')
to no more than e.g.HighdimPlots.corner(data)
.