[R] Error: X11 cannot allocate additional graphics colours.

Charles C. Berry cberry at tajo.ucsd.edu
Mon Oct 15 23:39:13 CEST 2007


On Mon, 15 Oct 2007, michael watson (IAH-C) wrote:

> Thanks for the response...
>
> My confusion about plot stems from the fact I am plotting 82 points with 82 colours, so surely all colours get plotted?
>
[snip]

No. That was the point of this bit:

>
> 	hist( mat, breaks=n )
>

Or if that is too obscure, try this a few times:

> mat <- matrix(rnorm(5),nc=1)
> image(mat,col=terrain.colors(5))


Usually you will see fewer than 5 colors.

---

Sorry about the misdirection about X-server issues, which Marc corrected.

---

I did not see any pointers to

 	X11( colortype = "pseudo.cube" )

which the error message was pointing you to. see ?X11 for more.

[snip]

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



More information about the R-help mailing list