[R] Background color of plot

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Feb 4 17:32:03 CET 2003


Patricia Maforte dos Santos wrote:
> I'm using the parameters "mfrow" and "mfg" to display some graphics(plots)
> at the same time. Although, because of the parameter "mfg", the parameter
> "bg" don?t change the background color.
> 
> What can I do to solve this?
> 
> 
> Here is the code I'm using...
> 
> ...
>      i <- 1
>      for(j in 1:4){
>          for(k in 1:2){
>                      limiares <- tabLimiar(arrayMetricas[,i])
>                      op <- par(mfrow=c(4,2),pty="s")
>                      par(mfg=c(j,k))

Set it in par() as in the following example:

  par(bg="green", mfrow=c(2, 1))
  plot(1:10)
  plot(1:10)

Uwe Ligges


>                      plot(limiares,main=a[i],ylab="frequencia",xlab="limiares",bg="white",col="green",col.main="seagreen",type="b")
>                      box(which="figure",lty="solid",col="white")
>                      par(op)
>                      i <- i+1
>                      if(i == ncol(arrayMetricas))
>                         break
>          }
>      }
> ...
> 
> 
> Patricia.
> 
> ----------------------------------
> Patr?cia Maforte dos Santos
> Centro de Informatica
> Universidade Federal de Pernambuco
> Recife/PE - Brasil
> ----------------------------------




More information about the R-help mailing list