On 28/03/12 15:49, alan wrote:
I want to plot many points and want to use circles. The filling color
depends on variable a. if a=1, then not fill
if a=2 then fill with red, if a=3 then fill with blue, if a=4, fill
half with red and half with blue. Can anyone tell me how to plot the
case "a=4"? Thanks a lot

I could be wrong --- this was known to happen once :-) --- but I
strongly doubt that there is anything ``off the peg'' that will do
what you want.  You'll have to roll your own.  I'd suggest
looking at the draw.circle() function from the plotrix package
for some ideas on how to get started.

It seems to me that for each such circle you'll have to plot
two polygons --- one for each half of the circle --- and specify
fill="red" for one and fill="blue" for the other.

It's all do-able, but is it worth the effort?  Why not fill with
green (say) when a=4?

    cheers,

        Rolf Turner

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to