Re: [S] graphsheet(background.color in graphs

Prof Brian D Ripley (
Wed, 21 Oct 1998 20:45:27 +0100 (BST)

On Wed, 21 Oct 1998, Jean Adams wrote:

> I am trying to define a function which calls graphsheet() with a
> specified color scheme and a dark blue background. I have no problem
> specifying any of the colors except for the background color. In the
> graphsheet() help file, not much information is given on how to fix
> the background color:
> background.color - background color of the graph sheet. This
> will override the background color indicated by
> When I define the function as
> graph.slide <- function(...)
> graphsheet(..., background.color="8,29,88",
> color.table="250,253,0|0,0,0")
> and run the program
> graph.slide()
> plot(1:10, 1:10)
> I get a yellow plot on a white (not the requested dark blue)
> background and the following warning message (twice)
> WARNING: Property TXPROP_GraphSheetColor or Argument
> GraphSheetColor has no option 8,29,88.
> When I try the function as
> graph.slide <- function(...)
> graphsheet(..., background.color=c(8, 29, 88),
> color.table="250,253,0|0,0,0")
> I get the following error message
> Error in graphsheet(background.color = c(8, 29, 88), colo..:
> arguments not all scalars: background.color, color
> Dumped
> If you can successfully set the background color, I'd greatly
> appreciate it if you let me know how. Thanks.

Yes! Generally you can only the values that work when doing things like
this from the GUI, and the drop-down list in the GUI for `background color'
gives a set of names for colo(u)rs. What those names are can be found (in
4.5) by


For a custom colour, use of the 16 `custom colors' User1 to User16, e.g.

graph.slide <- function(...)
graphsheet(..., background.color="User3",

There are 48 colours in the `basic colors' of the palette dialog box,
including a dark blue, but only some of those seem to have names.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

----------------------------------------------------------------------- This message was distributed by To unsubscribe send e-mail to with the BODY of the message: unsubscribe s-news