Dear all,
i have the attached data called "new" as data.frame. First I have only three columns called Var1, Var2 and Freq and with bind I attached the column test for a color specification (TEST DATA below).



With this plot function (require packages lattice)



  dotplot(reorder(Var1, rep(score, cl.count)) ~ Freq | Var2, 
    data = DATA, origin = 0, type = c("p", "h"), 
    main = paste("The", top, "Top Ranking Features"), 
    xlab = xlab, 
    layout=c(cl.count,1), col=new["test"])

i want to plot the data. 
Score indicated the scores which was calculated in a previous step and in my case i extracted 40 score values (each for every row name). Attached below and shown as a matrix. cl.count indicates 3 groups (RA, OA and JT)

Sadly, the colors are not in this way i like. If I look at the new[,"test"]  column only the rows 1,3,7,and 12 have the value "blue" and all other rows have the value "green". But when I look at my created plot there are 12 lines with a blue color. Can anybody explain me, why it is not possible to get the blue color only in the rows where "blue" is indicated?
Glad to hear from you.
All the best 
Peter






#### DATA#####
Var1	Var2	Freq
208869_s_at	JT	10.6802376685463
203394_s_at	JT	10.0160470327077
201533_at	JT	9.58401500697783
216520_s_at	JT	9.07764840614892
210999_s_at	JT	9.00219110130877
212284_x_at	JT	8.62193952504277
203752_s_at	JT	8.69193736253539
203574_at	JT	8.41492571590263
219629_at	JT	8.19111292436667
201473_at	JT	8.035082989931
210592_s_at	JT	8.00639829720742
200768_s_at	JT	7.88012483915651
201565_s_at	JT	7.89885432096935
AFFX-r2-P1-cre-3_at	JT	7.86490927895639
202014_at	JT	7.69345791769434
212671_s_at	JT	-7.43350555284605
203395_s_at	JT	7.51127977823914
208980_s_at	JT	7.52175408445448
207783_x_at	JT	7.31954223019292
215446_s_at	JT	-6.28236730203077
203034_s_at	JT	7.24582647671987
211943_x_at	JT	7.22247828112639
203974_at	JT	-6.84217612309489
201810_s_at	JT	7.0727443704914
201693_s_at	JT	7.11350154823655
213614_x_at	JT	7.07586402329325
AFFX-CreX-5_at	JT	7.05274590106307
201798_s_at	JT	-6.98858491240942
212869_x_at	JT	6.97833756793094
201531_at	JT	6.96660504363297
201170_s_at	JT	6.90904695259236
200886_s_at	JT	-6.92645789612039
AFFX-r2-P1-cre-5_at	JT	6.85399276205727
201429_s_at	JT	6.68557384216737
212665_at	JT	6.75579868986925
208695_s_at	JT	6.8087149011011
211654_x_at	JT	-6.7426888322764
209927_s_at	JT	-6.74856557366229
203107_x_at	JT	6.72120597236789
211296_x_at	JT	6.60226581063165
208869_s_at	OA	-3.73983541027906
203394_s_at	OA	-3.29203821581412
201533_at	OA	-3.2383756900468
216520_s_at	OA	-4.59979375515969
210999_s_at	OA	-5.10853597491871
212284_x_at	OA	-5.84925048581651
203752_s_at	OA	-4.54427623838229
203574_at	OA	-2.59882534850623
219629_at	OA	-4.35550869055387
201473_at	OA	-3.15685663855675
210592_s_at	OA	-4.52611461089035
200768_s_at	OA	-2.76833454650619
201565_s_at	OA	-3.80972141262264
AFFX-r2-P1-cre-3_at	OA	-3.53240421347696
202014_at	OA	-2.60784960582222
212671_s_at	OA	1.68584117381632
203395_s_at	OA	-2.27910272551108
208980_s_at	OA	-3.66266591800146
207783_x_at	OA	-3.93093352561262
215446_s_at	OA	6.26626194024723
203034_s_at	OA	-3.84606488854982
211943_x_at	OA	-3.30831181470312
203974_at	OA	1.17068337099947
201810_s_at	OA	-2.07855331860079
201693_s_at	OA	-2.74740330465003
213614_x_at	OA	-3.03851670866666
AFFX-CreX-5_at	OA	-3.46221400689819
201798_s_at	OA	4.03100733638473
212869_x_at	OA	-3.97300711584927
201531_at	OA	-2.96907452702537
201170_s_at	OA	-2.70131412682545
200886_s_at	OA	2.96401783822817
AFFX-r2-P1-cre-5_at	OA	-2.89903293592039
201429_s_at	OA	-4.35557947874114
212665_at	OA	-2.39194028704917
208695_s_at	OA	-3.35547642329559
211654_x_at	OA	2.68663713811722
209927_s_at	OA	3.34341605878591
203107_x_at	OA	-3.66321419312914
211296_x_at	OA	-4.25932160076237
208869_s_at	RA	-6.52772554526193
203394_s_at	RA	-6.32419887021955
201533_at	RA	-5.96832724224416
216520_s_at	RA	-4.21160115876773
210999_s_at	RA	-3.662138171127
212284_x_at	RA	-2.60782479125985
203752_s_at	RA	-3.90104095781671
203574_at	RA	-5.47027470876589
219629_at	RA	-3.60753898792399
201473_at	RA	-4.58816673507709
210592_s_at	RA	-3.27334582039087
200768_s_at	RA	-4.80784295112116
201565_s_at	RA	-3.8459928330509
AFFX-r2-P1-cre-3_at	RA	-4.07489406787897
202014_at	RA	-4.7832177524091
212671_s_at	RA	5.40590792815972
203395_s_at	RA	-4.92107150759781
208980_s_at	RA	-3.62962656459378
207783_x_at	RA	-3.18712183828209
215446_s_at	RA	0.0151477360559071
203034_s_at	RA	-3.19761157077928
211943_x_at	RA	-3.68142990571529
203974_at	RA	5.33426547049511
201810_s_at	RA	-4.69723616790538
201693_s_at	RA	-4.10648979370521
213614_x_at	RA	-3.79728641367864
AFFX-CreX-5_at	RA	-3.37703866352978
201798_s_at	RA	2.78171984514488
212869_x_at	RA	-2.8266333324756
201531_at	RA	-3.7598371247344
201170_s_at	RA	-3.95754079263605
200886_s_at	RA	3.72683314668998
AFFX-r2-P1-cre-5_at	RA	-3.71979768994025
201429_s_at	RA	-2.19145276606072
212665_at	RA	-4.10438313399814
208695_s_at	RA	-3.24790872151558
211654_x_at	RA	3.81487862974044
209927_s_at	RA	3.20267913105723
203107_x_at	RA	-2.87616341412488
211296_x_at	RA	-2.20363261389773



####### TEST DATA ########

Var1	Var2	Freq	test
208869_s_at	JT	10.6802376685463	blue
203394_s_at	JT	10.0160470327077	green
201533_at	JT	9.58401500697783	blue
216520_s_at	JT	9.07764840614892	green
210999_s_at	JT	9.00219110130877	green
212284_x_at	JT	8.62193952504277	green
203752_s_at	JT	8.69193736253539	blue
203574_at	JT	8.41492571590263	green
219629_at	JT	8.19111292436667	green
201473_at	JT	8.035082989931	green
210592_s_at	JT	8.00639829720742	green
200768_s_at	JT	7.88012483915651	blue
201565_s_at	JT	7.89885432096935	green
AFFX-r2-P1-cre-3_at	JT	7.86490927895639	green
202014_at	JT	7.69345791769434	green
212671_s_at	JT	-7.43350555284605	green
203395_s_at	JT	7.51127977823914	green
208980_s_at	JT	7.52175408445448	green
207783_x_at	JT	7.31954223019292	green
215446_s_at	JT	-6.28236730203077	green
203034_s_at	JT	7.24582647671987	green
211943_x_at	JT	7.22247828112639	green
203974_at	JT	-6.84217612309489	green
201810_s_at	JT	7.0727443704914	green
201693_s_at	JT	7.11350154823655	green
213614_x_at	JT	7.07586402329325	green
AFFX-CreX-5_at	JT	7.05274590106307	green
201798_s_at	JT	-6.98858491240942	green
212869_x_at	JT	6.97833756793094	green
201531_at	JT	6.96660504363297	green
201170_s_at	JT	6.90904695259236	green
200886_s_at	JT	-6.92645789612039	green
AFFX-r2-P1-cre-5_at	JT	6.85399276205727	green
201429_s_at	JT	6.68557384216737	green
212665_at	JT	6.75579868986925	green
208695_s_at	JT	6.8087149011011	green
211654_x_at	JT	-6.7426888322764	green
209927_s_at	JT	-6.74856557366229	green
203107_x_at	JT	6.72120597236789	green
211296_x_at	JT	6.60226581063165	green
208869_s_at	OA	-3.73983541027906	green
203394_s_at	OA	-3.29203821581412	green
201533_at	OA	-3.2383756900468	green
216520_s_at	OA	-4.59979375515969	green
210999_s_at	OA	-5.10853597491871	green
212284_x_at	OA	-5.84925048581651	green
203752_s_at	OA	-4.54427623838229	green
203574_at	OA	-2.59882534850623	green
219629_at	OA	-4.35550869055387	green
201473_at	OA	-3.15685663855675	green
210592_s_at	OA	-4.52611461089035	green
200768_s_at	OA	-2.76833454650619	green
201565_s_at	OA	-3.80972141262264	green
AFFX-r2-P1-cre-3_at	OA	-3.53240421347696	green
202014_at	OA	-2.60784960582222	green
212671_s_at	OA	1.68584117381632	green
203395_s_at	OA	-2.27910272551108	green
208980_s_at	OA	-3.66266591800146	green
207783_x_at	OA	-3.93093352561262	green
215446_s_at	OA	6.26626194024723	green
203034_s_at	OA	-3.84606488854982	green
211943_x_at	OA	-3.30831181470312	green
203974_at	OA	1.17068337099947	green
201810_s_at	OA	-2.07855331860079	green
201693_s_at	OA	-2.74740330465003	green
213614_x_at	OA	-3.03851670866666	green
AFFX-CreX-5_at	OA	-3.46221400689819	green
201798_s_at	OA	4.03100733638473	green
212869_x_at	OA	-3.97300711584927	green
201531_at	OA	-2.96907452702537	green
201170_s_at	OA	-2.70131412682545	green
200886_s_at	OA	2.96401783822817	green
AFFX-r2-P1-cre-5_at	OA	-2.89903293592039	green
201429_s_at	OA	-4.35557947874114	green
212665_at	OA	-2.39194028704917	green
208695_s_at	OA	-3.35547642329559	green
211654_x_at	OA	2.68663713811722	green
209927_s_at	OA	3.34341605878591	green
203107_x_at	OA	-3.66321419312914	green
211296_x_at	OA	-4.25932160076237	green
208869_s_at	RA	-6.52772554526193	green
203394_s_at	RA	-6.32419887021955	green
201533_at	RA	-5.96832724224416	green
216520_s_at	RA	-4.21160115876773	green
210999_s_at	RA	-3.662138171127	green
212284_x_at	RA	-2.60782479125985	green
203752_s_at	RA	-3.90104095781671	green
203574_at	RA	-5.47027470876589	green
219629_at	RA	-3.60753898792399	green
201473_at	RA	-4.58816673507709	green
210592_s_at	RA	-3.27334582039087	green
200768_s_at	RA	-4.80784295112116	green
201565_s_at	RA	-3.8459928330509	green
AFFX-r2-P1-cre-3_at	RA	-4.07489406787897	green
202014_at	RA	-4.7832177524091	green
212671_s_at	RA	5.40590792815972	green
203395_s_at	RA	-4.92107150759781	green
208980_s_at	RA	-3.62962656459378	green
207783_x_at	RA	-3.18712183828209	green
215446_s_at	RA	0.0151477360559071	green
203034_s_at	RA	-3.19761157077928	green
211943_x_at	RA	-3.68142990571529	green
203974_at	RA	5.33426547049511	green
201810_s_at	RA	-4.69723616790538	green
201693_s_at	RA	-4.10648979370521	green
213614_x_at	RA	-3.79728641367864	green
AFFX-CreX-5_at	RA	-3.37703866352978	green
201798_s_at	RA	2.78171984514488	green
212869_x_at	RA	-2.8266333324756	green
201531_at	RA	-3.7598371247344	green
201170_s_at	RA	-3.95754079263605	green
200886_s_at	RA	3.72683314668998	green
AFFX-r2-P1-cre-5_at	RA	-3.71979768994025	green
201429_s_at	RA	-2.19145276606072	green
212665_at	RA	-4.10438313399814	green
208695_s_at	RA	-3.24790872151558	green
211654_x_at	RA	3.81487862974044	green
209927_s_at	RA	3.20267913105723	green
203107_x_at	RA	-2.87616341412488	green
211296_x_at	RA	-2.20363261389773	green

	[[alternative HTML version deleted]]

