I have several functions of two variables defined in some region, say
functions[x_,y_]:={0,x-y,Sin[x^2-y]}
I'd like a plot to show at a glance the regions where each function is largest, with a different colour or similar. One approach is to just do a RegionPlot for every function, showing where it's biggest, and stick them all together, something like this (apologies for the hideous colours):
Show@Array[RegionPlot[{#} == Ordering[functions[x, y], -1], {x,0,1}, {y,0,1},
MaxRecursion -> 10, PlotStyle -> ColorData[1, "ColorList"][[#]]] &, 3]
This is fine as far as it goes, but I can't help but feel there's a better way. For example, if my functions are more expensive to evaluate, and if there are many of them, this is slow, since everything must be done many times.
For two functions, ContourPlot on the difference seems exceedingly sensible, but I can't think of how to generalize it to more than two.
So: what other clever ways might you suggest to implement this?