Axel - from patch you need to either provide a C the polygon colour specified as a scalar, vector, matrix, or a color name which may be the C you are passing in for the FaceVertextCData propery (though you may observe another error if you try to use this C for the polygon colour). Or you can just do
patch('XData', X, 'YData', Y, 'FaceVertexCData',C,'EdgeColor','flat','FaceColor','none','LineWidth',2)
