Prev: Can I have a programmable pulse generator that has "phase delay'and 'duty ratio' as the external input
Next: loading m-files at run time
From: seb Yan on 15 Mar 2010 16:09 Hello there. I'm using 'fill' to generate a series of polygons with [R G B] colour. The code is like this: for i=1:n; x=data(i,4:7); y=data(i,8:11); fill(x,y,[230/255 230/255 1]); end It always displays the coloured polygons with black edges. Anyone know how to hide the black edge or shall I use other functions say 'patch'? Many thanks! Seb
From: Walter Roberson on 15 Mar 2010 16:21 seb Yan wrote: > Hello there. I'm using 'fill' to generate a series of polygons with [R G > B] colour. The code is like this: > > for i=1:n; > x=data(i,4:7); > y=data(i,8:11); > fill(x,y,[230/255 230/255 1]); > end > > It always displays the coloured polygons with black edges. Anyone know > how to hide the black edge or shall I use other functions say 'patch'? fill creates a patch, so just record the handle returned by fill and set() the EdgeColor property to 'none'.
From: seb on 16 Mar 2010 06:57 Walter Roberson <roberson(a)hushmail.com> wrote in message <hnm5eq$klc$1(a)canopus.cc.umanitoba.ca>... > seb Yan wrote: > > Hello there. I'm using 'fill' to generate a series of polygons with [R G > > B] colour. The code is like this: > > > > for i=1:n; > > x=data(i,4:7); > > y=data(i,8:11); > > fill(x,y,[230/255 230/255 1]); > > end > > > > It always displays the coloured polygons with black edges. Anyone know > > how to hide the black edge or shall I use other functions say 'patch'? > > fill creates a patch, so just record the handle returned by fill and set() the > EdgeColor property to 'none'. Thanks a lot Walter. I tried to change the code as this: for i=1:n; x=data(i,4:7); y=data(i,8:11); f=fill(x,y,[230/255 230/255 1]); set(f,'edgecolor',none,'facecolor',flat) end However it didn't return any visible polygons. Could you tell me what's wrong with that? Cheers
From: seb on 16 Mar 2010 07:11
"seb " <sebastien.k.yan(a)gmail.com> wrote in message <hnno6h$5c6$1(a)fred.mathworks.com>... > Walter Roberson <roberson(a)hushmail.com> wrote in message <hnm5eq$klc$1(a)canopus.cc.umanitoba.ca>... > > seb Yan wrote: > > > Hello there. I'm using 'fill' to generate a series of polygons with [R G > > > B] colour. The code is like this: > > > > > > for i=1:n; > > > x=data(i,4:7); > > > y=data(i,8:11); > > > fill(x,y,[230/255 230/255 1]); > > > end > > > > > > It always displays the coloured polygons with black edges. Anyone know > > > how to hide the black edge or shall I use other functions say 'patch'? > > > > fill creates a patch, so just record the handle returned by fill and set() the > > EdgeColor property to 'none'. > > Thanks a lot Walter. I tried to change the code as this: > > for i=1:n; > x=data(i,4:7); > y=data(i,8:11); > f=fill(x,y,[230/255 230/255 1]); > set(f,'edgecolor',none,'facecolor',flat) > end > > However it didn't return any visible polygons. Could you tell me what's wrong with that? Cheers Sorry, changed it into set(f,'EdgeColor','none'), it works! Thanks! |