title: How to change colors of lines in an R chart made with Dotplot
body: <p>I am using Dotplot to show the Upper/Lower and Mean of a series of data.  Instead of the lines connecting the Upper/Lower being all the same color, I would like to change them to have three colors matching three tests of PSQ, MODS, and LPA.</p>
  
  <p>I have tried adding groups=Test but that changes the colors of the dots, not the lines.  I have tried changing the plot.line to read <code>par.settings=list(dot.symbol=list(col="red"), plot.line=list(col="black"))))c("black", "green", "yellow")</code> but that appears to do nothing.</p>
  
  <p>Where is that fine control found ?  I must admit that my review of all the documentation has left me completely confused!</p>
  
  <pre><code>library(lattice)
  library(Hmisc)
  library(latticeExtra)
  df3 &lt;- data.frame (Center=c(0.939096267,0.996441281,0.959493671,0.97,0.986899563,0.975308642,0.952554745,0.961038961,0.955070603,0.966527197,0.978851964,0.971569839,0.995642702,0.977777778,0.989026063,0.938496583,0.990990991,0.95612708,0.867924528,1,0.989583333,0.9,0.995447648,0.986282579,0.835616438,0.993131868,0.978776529,0.862745098,0.996779388,0.986607143,0.850746269,0.993957704,0.98079561,0.842857143,0.990424077,0.97752809,0.479166667,1,0.925595238,0.618644068,0.998363339,0.936899863,0.504132231,0.992647059,0.918851436,0.95473251,0.98997996,0.978436658,0.978417266,0.971046771,0.973865199,0.9375,0.983050847,0.966397849,0.959016393,0.993975904,0.982479784,0.982332155,0.979820628,0.98079561,0.941818182,0.991489362,0.973154362),
  Lower95=c(0.913721501,0.977214764,0.942646509,0.949873385,0.959047884,0.96047959,0.930325646,0.924883712,0.937420013,0.945052276,0.955010789,0.95696795,0.982586611,0.949905896,0.977597259,0.9106776,0.964346872,0.936824251,0.740467462,0.992310928,0.977667054,0.79897089,0.985589893,0.974057008,0.726511974,0.983074825,0.965515713,0.731276464,0.987098305,0.973782151,0.737989738,0.983497602,0.967175385,0.731947886,0.979457041,0.964003246,0.37701062,0.991740763,0.902414021,0.524297048,0.989439738,0.916087186,0.412290545,0.981888477,0.897194717,0.918220108,0.97538158,0.964437118,0.951322012,0.949720369,0.958715474,0.900010728,0.965534012,0.950076233,0.923645134,0.980972436,0.969416444,0.956905801,0.960656542,0.967175385,0.905411484,0.976821949,0.958094682),
  Upper95=c(0.957586629,0.999814212,0.971692002,0.982495167,0.996610635,0.984859048,0.968166084,0.980868932,0.968060604,0.980094808,0.99070216,0.981478773,0.999244937,0.990934934,0.994888595,0.958329294,0.998438069,0.969907638,0.940863624,1,0.99542805,0.955466392,0.998823583,0.993014472,0.908580205,0.997468782,0.987188883,0.938490331,0.999441979,0.993450192,0.922307277,0.998062689,0.989039583,0.915246243,0.995797617,0.986224356,0.583007853,1,0.943758562,0.705153863,0.999914563,0.952955984,0.595707992,0.997289904,0.936378766,0.97602415,0.996305355,0.987199157,0.991196692,0.983827825,0.983745192,0.962046972,0.992098025,0.977683872,0.979040058,0.998442942,0.990230713,0.993477661,0.990120709,0.989039583,0.965275249,0.997270272,0.983085371),
  Drug=c("INH","INH","INH","INH","INH","INH","INH","INH","INH","RIF","RIF","RIF","RIF","RIF","RIF","RIF","RIF","RIF","AMK","AMK","AMK","AMK","AMK","AMK","AMK","AMK","AMK","CAP","CAP","CAP","CAP","CAP","CAP","CAP","CAP","CAP","KAN","KAN","KAN","KAN","KAN","KAN","KAN","KAN","KAN","MOX","MOX","MOX","MOX","MOX","MOX","MOX","MOX","MOX","OFX","OFX","OFX","OFX","OFX","OFX","OFX","OFX","OFX"),
  Test=c("LPA","LPA","LPA","MODS","MODS","MODS","PSQ","PSQ","PSQ","LPA","LPA","LPA","MODS","MODS","MODS","PSQ","PSQ","PSQ","LPA","LPA","LPA","MODS","MODS","MODS","PSQ","PSQ","PSQ","LPA","LPA","LPA","MODS","MODS","MODS","PSQ","PSQ","PSQ","LPA","LPA","LPA","MODS","MODS","MODS","PSQ","PSQ","PSQ","LPA","LPA","LPA","MODS","MODS","MODS","PSQ","PSQ","PSQ","LPA","LPA","LPA","MODS","MODS","MODS","PSQ","PSQ","PSQ"),
  Measure=c("Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree","Sensitivity","Specificity","Agree")
  )
  
  foo &lt;- useOuterStrips(Dotplot(Test~Cbind(Center,Lower95,Upper95) | Measure+Drug, 
      df3, xlim=c(0.9,1), 
      as.table=TRUE, 
      par.settings=list(dot.symbol=list(col="red"), plot.line=list(col="black"))))
  foo
  </code></pre>
  
  <p>Thanks !</p>