[R] venneuler (java?) color palette 0 - 1

Paul Murrell p.murrell at auckland.ac.nz
Sun Oct 10 22:41:08 CEST 2010


Hi

On 11/10/2010 9:01 a.m., Karl Brand wrote:
> Dear UseRs and DevelopeRs
>
> It would be helpful to see the color palette available in the
> venneuler() function.
>
> The relevant par of ?venneuler states:
>
> "colors: colors of the circles as values between 0 and 1"
>
> -which explains color specification, but from what pallette? Short of
> trial and error, i'd really appreciate if some one could help me locate
> a "0 - 1" pallette for this function to aid with color selection.

The color spec stored in the VennDiagram object is multiplied by 360 to 
give the "hue" component of an hcl() colour specification.  For example, 
0.5 would mean the colour hcl(0.5*360, 130, 60)

Alternatively, you can control the colours when you call plot, for 
example, ...

plot(ve, col=c("red", "green", "blue"))

... should work.

Paul

> FWIW, i tried the below code and received the displayed error. I failed
> to turn up any solutions to this error...
>
> Any suggestions appreciated,
>
> Karl
>
>
> library(venneuler)
>
> ve<- venneuler(c("A"=1, "B"=2, "C"=3, "A&C"=0.5, "A&B&C"=0.1))
>
> class(ve)
> [1] "VennDiagram"
>
> ve$colors<- c("red", "green", "blue")
>
> plot(ve)
>
> Error in col * 360 : non-numeric argument to binary operator
>

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/



More information about the R-help mailing list