From: seb Yan on
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
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
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
"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!