Prev: Computation time reduction between using "parfor" and "for" loops
Next: How to output dydt while using dde solver?
From: d Milthon on 7 Jun 2010 19:56 Hello all, I have a small patch problem that might be close to this one, considering 2 object patch. I have a polygon inside a polygon (polygon with a 'hole') and I'm trying to use the patch command (in my GUI) to color only the big polygon without the inner hole so i need to color the bigger one (doesn't matter what color) and the smaller polygon needs to be white (or background color) so it would look like a hole inside a polygon. i tried: p=patch(x,y,z,'w'); clear z z = [3 37]; set(p,'FaceColor','flat','CData',z,'CDataMapping','scaled') but i can only give strange colors to the 2 faces, not white as i need. and as i try to use 'w' it gives white color to both inner nad outer polygon. I tried the examples in Matlab's Help to use RGB property but it didn't work. Any help with this patch coloring ? Thanks, Damian |