nschloe/matlab2tikz — pull request #359 by okomarov (2014-10-14 23:49:17+00:00)
Title: [Add/Change/Fix #346] Revisit surfOptions and add full test suite

Fixes #346. I revisited `surfaceOpts()` according to the _Manual for Package pgfplots_ under sections 4.6.6 Surface Plots (pag 127) and 4.6.5 Mesh Plots (pag 124) and added a full set of test functions. Maybe @cfeuersaenger could check if that is correct.

Follows a table which shows the correct shader corresponding to the values that the Matlab `surf()` options `'EdgeColor'` and `'FaceColor'` assume (after the plot has been created).

shader= (or special) | FaceColor | EdgeColor
---|---|---
flat (or flat mean) | 'flat' | 'flat' or 'none'
interp|'interp'|'interp' or 'none'
faceted (or flat + draw=color)|'flat'|RGB triplet
faceted|RGB triplet| 'interp'
faceted interp| 'interp'|'flat'
"no shader"|RGB triplet|RGB triplet
"only axes"|'none'|'none'
"mesh" interp|'none'| 'interp'
"mesh" RGB| 'none'|RGB triplet
flat corner (not used)|?|?

I could probably simplify `surfaceOpts()` with a `switch ... case` statement, but I need to convert in a `try ... catch` the face/edge RGB colors into strings. I think as is is still readable (and faster than a try catch).