Skip to content
Prev 200870 / 398503 Next

Change color of single panel in xyplot

This was just answered by Deepayan earlier today:

This code did not produce the plot you have linked to. The answer to
your question depends on how you created the plot, so you have to tell
us that. Changing the color in all panels is easy:

histogram(rnorm(100), col = "goldenrod")

Different colors in different panels is a little more work:

histogram(~rnorm(100) | gl(3, 1, 100),
          mycolors = sample(colors(), 3),
          panel = function(..., col, mycolors) {
              panel.histogram(..., col = mycolors[panel.number()])
          })

-Deepayan


--  
David
On Nov 19, 2009, at 5:43 PM, jimdare wrote:

            
David Winsemius, MD
Heritage Laboratories
West Hartford, CT