Re: [R] background colors in image()

From: array chip <arrayprofile_at_yahoo.com>
Date: Thu 11 Aug 2005 - 08:59:43 EST


Thanks for the suggestion! It works in a way that the entire graph window is in the background color, is there a way to only have the plotting area (i.e. the area within the axis box in the background color, but leave the area outside the axes to be unchanged (white)?

Thanks!

> On Wed, 10 Aug 2005, someone needing to conceal his
> real name wrote:
>
> > Hi, I am using image() function to plot a matrix
> which
> > has some missing valuies (NA). It looks like, by
> > default, missing values were drawn in white color,
> How
> > can I change that into a different color, say a
> gray
> > color? I tried to use bg='gray' argument with no
> luck.
> > Anyone has a suggestion?
>
> They are not drawn in white: in fact they are not
> drawn at all, so the
> current background (or if transparent, the canvas)
> is what you see.
>
> > par(bg="yellow")
> > image(matrix(c(1,2,NA, 1),2, 2))
>
> works, for example.
>
> --
> Brian D. Ripley,
> ripley@stats.ox.ac.uk
> Professor of Applied Statistics,
> http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865
> 272861 (self)
> 1 South Parks Road, +44 1865
> 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865
> 272595
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Aug 11 09:04:45 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:45 EST