Skip to content
Back to formatted view

Raw Message

Message-ID: <eb555e660812281205h6343adc8mda607283fca720e0@mail.gmail.com>
Date: 2008-12-28T20:05:26Z
From: Deepayan Sarkar
Subject: Borders for rectangles in lattice plot key
In-Reply-To: <OF8D8703FA.9ED9C406-ON80257528.0034142C-80257528.00359CAB@hsl.gov.uk>

On 12/23/08, Richard.Cotton at hsl.gov.uk <Richard.Cotton at hsl.gov.uk> wrote:
> Hopefully an easy question.  When drawing a rectangles in a lattice plot
>  key, how do you omit the black borders?

They are currently hard-coded. I will add support for a 'border' component.

-Deepayan

>  Here is an example adapted from one on the xyplot help page:
>
>  bar.cols <- c("red", "blue")
>  key.list <- list(
>    space="top",
>    rectangles=list(col=bar.cols),
>    text=list(c("foo", "bar"))
>  )
>
>  barchart(
>    yield ~ variety | site,
>    data = barley,
>    groups = year,
>    layout = c(1,6),
>    ylab = "Barley Yield (bushels/acre)",
>    scales = list(x = list(abbreviate = TRUE, minlength = 5)),
>    col=bar.cols,
>    border="transparent",
>    key=key.list
>  )
>
>  Notice the black borders around the rectangles in the key.
>
>  I checked to see if there was an undocumented border component for the
>  rectangles compoenent of key that I could set to "transparent" or FALSE,
>  but no luck.  I also tried setting lwd=0 on the rectangle component but
>  that didn't change anything either.
>
>  Regards,
>  Richie.
>
>  Mathematical Sciences Unit
>  HSL
>
>
>  ------------------------------------------------------------------------
>  ATTENTION:
>
>  This message contains privileged and confidential inform...{{dropped:20}}
>
>  ______________________________________________
>  R-help at r-project.org mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-help
>  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>  and provide commented, minimal, self-contained, reproducible code.
>