title: forestplot use different shapes or colors
body: <p>I want to create a plot that has adjusted values (top line for each stratum) and matched values (line represented by X in each stratum) across all strata eg men, women, age &lt;55, age >55 etc. For the matched values, I'd like to have a diamond/other shape or different colour to highlight. But not sure how to do?</p>
  
  <p>I realise I could use this example <a href="http://gforge.se/2013/12/the-forestplot-of-dreams/" rel="nofollow noreferrer">http://gforge.se/2013/12/the-forestplot-of-dreams/</a>  to make two separate datasets, one for adjusted values and one for matched values, and then combine - but would rather not have to input all values again.</p>
  
  <p>Can someone please help edit the third section of my code to make a diff shape or diff colour for the matched values in my graph (matched vals are the lines represented by X in the N column). </p>
  
  <pre><code> library(forestplot)
  main_acevccb &lt;- 
    structure(list(
      mean  = c(NA, NA, NA, -1.12, -0.64, -1.55,-1.60, NA, -1.35,-1.44, -1.3, -1.2, NA, -1.29,-1.23, -2.82,-2.15, -1.84,-2.72), 
      lower = c(NA, NA, NA, -1.41, -0.84, -1.85, -1.86, NA, -1.71,-1.9, -1.57,-1.52, NA, -1.53, -1.54, -4.04, -3.61, -2.85,-4.45),
      upper = c(NA, NA, NA, -0.83, -0.44, -1.26, -1.34, NA, -1.0, -0.98,-1.04, -0.87, NA, -1.04,-0.93, -1.59,-0.68, -0.82, -0.99)),
      .Names = c("Difference", "lower", "upper"), 
      row.names = c(NA, -19L), 
      class = "data.frame")
  
  tabletext_acevccb&lt;-cbind(
    c("", "Analysis", "", "Male", "", "Female","", "", "Aged &lt;55yrs","",  "Aged &gt;=55yrs", "", "", "White", "", "Black", "", "South Asian", ""),
    c("", "N", NA, "146,763", "X",  "123,425", "X", NA, "104,584","X", "165,604", "X", NA, "258,565", "X", "4,115", "X", "5,148", "X"), 
    c(NA, "Diff Sys BP 
      CCB vs ACE/ARB", NA, "-1.12","-0.64", "-1.55", "-1.60", NA, "-1.35", "-1.44", "-1.30", "-1.20", NA, "-1.29","-1.23",  "-2.82", "-2.15", "-1.84", "-2.72"), 
    c(NA, "95% CI", NA,"-1.41 : -0.83", "-0.84 : -0.44", "-1.85 : -1.26", "-1.86 : -1.34", NA, "-1.71 : -1.0", "-1.90 : -0.98", "-1.57 : -1.04", "-1.52 : -0.87", NA, "-1.53 : -1.04", "-1.54 : -0.93", "-4.04 : -1.59", "-3.61 : -0.68", "-2.85 : -0.82", "-4.45 : -0.99"))
  
  forestplot(tabletext_acevccb, 
             main_acevccb,new_page = TRUE,    
             hrzl_lines=list("3" = gpar(lwd=1, col="#444444")), 
             is.summary=c(TRUE, TRUE, TRUE, rep(FALSE, 16)),
             txt_gp = fpTxtGp(label=gpar(cex=0.7)
             ),
             boxsize=0.25,
             xlog=F, 
             graphwidth = unit(7.5, "cm"),
             clip= c(-3.5, 0.5),
             xticks=c(-3.5, -3.0, -2.5, -2.0, -1.5, -1.0, -0.5 , 0, 0.5),
             col=fpColors(box="royalblue",line="darkblue"))
  </code></pre>
  
  <p>EDIT
  Below is the code to provide graph as per below advice. Thank you for suggesting this.  However, to maintain the "n", "diff" and "95% CI" as per my above graph - I think my question can be simplified to "how can I amend my col=fpColors code above to paint each box a different color?"</p>
  
  <pre><code> main_acevccb &lt;- structure(list(
     analysis = c( "Male","Male", "Female", "Female", NA, "&lt;55", "&lt;55", "&gt;55", "&gt;55",NA, "White", "White", "Black","Black", "SA", "SA"),
     mean  = c( -1.12, -0.64, -1.55,-1.60, NA, -1.35,-1.44, -1.3, -1.2, NA, -1.29,-1.23, -2.82,-2.15, -1.84,-2.72), 
      lower = c( -1.41, -0.84, -1.85, -1.86, NA, -1.71,-1.9, -1.57,-1.52, NA, -1.53, -1.54, -4.04, -3.61, -2.85,-4.45),
      upper = c( -0.83, -0.44, -1.26, -1.34, NA, -1.0, -0.98,-1.04, -0.87, NA, -1.04,-0.93, -1.59,-0.68, -0.82, -0.99),
      type = c( "adjusted", "matched","adjusted", "matched", NA, "adjusted", "matched","adjusted", "matched", NA, "adjusted", "matched","adjusted", "matched", "adjusted", "matched")),
      .Names = c("Analysis","Difference", "lower", "upper", "type"), 
      row.names = (c(NA, -16L)), 
      class = "data.frame")
  
  
  adjusted &lt;- subset(main_acevccb, type!="matched"|is.na(type))
  matched  &lt;- subset(main_acevccb, type!="adjusted"|is.na(type))
  
  
  forestplot(mean=cbind(adjusted[,"Difference"], matched[,"Difference"]),
             lower=cbind(adjusted[,"lower"], matched[,"lower"]), 
             upper=cbind(adjusted[,"upper"], matched[,"upper"]), 
             labeltext=matched$Analysis,
            legend=c("Adjusted", "Matched"),
            legend.pos=("bottomright"),           
            legend.gp = gpar(col="#AAAAAA"), 
            legend.r=unit(.1, "snpc"),
              fn.ci_norm = c(fpDrawNormalCI, fpDrawCircleCI),
             boxsize = .30, 
             line.margin = .5, 
             clip=c(-4.0, 1.0), 
             xticks=c(-4.0, -3.5, -3.0, -2.5, -2.0, -1.5, -1.0, -0.5, 0, 0.5, 1),
             col=fpColors(box=c("darkblue", "darkred")),
             xlab="Diff in Systolic BP CCB vs ACE-I/ARB",
             new_page=TRUE)
  </code></pre>