What is a standard way to make 2D region plots from data, using pgfplots? I've searched the forum, but I haven't found a thread on this subject.
The data would be organized, for example, in a three columns CSV, representing a 3D surface.
Probably one could start filling with colors the regions between contours in a "contour plot". But I would like an automatic way that works fine even when there are multiple separated regions that should have the same color.
The perfect example of what I would like is the figure, shown below for completness, from this Mathematica.SX thread. Please ignore the logscale, title and labels, because obviously the present question is not about such details; except that a similar legend would be welcome.
.
Additionally, is it possible to have control over colors, using maybe a piecewise function, similarly to what it is asked in the above Mathematica thread?
Edit
A very simple example, would be the paraboloid-like surface found in here, as a CSV.

surfplot style. How you go about it exactly depends on how your data is organised though: Are your data points evenly spaced on a grid, or are they scattered? – Jake Jul 03 '13 at 12:34view={0}{90}in theaxisoptions. For interpolating scattered data, look at http://tex.stackexchange.com/questions/118131/how-to-plot-a-surface-from-a-set-of-data. – Jake Jul 03 '13 at 12:54\documentclass{...}to\end{document}we directly copy paste the code and try different ideas and if it works you get an answer quickly. Otherwise not so many people have the patience to write a complete example from scratch. – percusse Jul 03 '13 at 12:59\addplot3 [surf] {y^2-x^2};for the hyperbolic paraboloid, for example). Could you take a look at the questions I linked to and see if that answers your question? If so, we can close this as a duplicate, if not, please edit your question to explain in more detail why the existing questions don't help. – Jake Jul 03 '13 at 13:52\addplot graphics. Or to explain to me how the algorithm for non-filled contours can be reused to implement filled contours (I would consider an implementation). – Christian Feuersänger Jul 03 '13 at 16:15\immediate\write19, for generating the region plot. I usepgfplotsfor creating labels, etc. I'm still working on the details. – fcpenha Jul 04 '13 at 01:45pgfplotsfully. What do you think? – fcpenha Jul 04 '13 at 02:02