Re: [R] lattice package - question on plotting lines

From: Tim Smith <tim_smith_666_at_yahoo.com>
Date: Tue 23 May 2006 - 23:59:49 EST


Thanks Tony. That solved a huge part of what I was trying to do.    

  I was going through the trellis documentation (Bell labs) too. Is there any other documentation/manual that you would recommend.    

  many thanks!    

  Tim

Tony <ahirst@qwest.net> wrote:
  On Mon, 2006-05-22 at 18:36 -0700, Tim Smith wrote:
> Hi all,
>
> I was trying to plot a graph using the following data:
>
> method percent accuracy group
> A1 4 0.8529 cns
> A1 10 0.8412 cns
> A1 15 0.8235 cns
> A2 4 0.9353 cns
> A2 10 0.9412 cns
> A2 15 0.9471 cns
> A1 4 0.8323 col
> A1 10 0.8452 col
> A1 15 0.8484 col
> A2 4 0.8839 col
> A2 10 0.8677 col
> A2 15 0.8678 col
>
> #################
> The code I'm using to generate the graphs is:
>
> ### code :
>
> xyplot(accuracy ~ percent|group,data = k, groups = method, allow.multiple = TRUE, scales = "same",type="o",
> xlab = "% of genes", ylab = "Accuracy", main = " Accuracy ", aspect = 2/3,
> panel = function(...) {
> panel.superpose(...)
> }
> )
>
>
> ####################
>
> I have tried to use the 'get' and 'set' functions of 'par()', but can't figured it out. I have two questions:
>
> i) How can I set it so that the line plotted for A1 in all the plots is 'solid', and the one for A2 is 'dotted' for both the groups (cns and col)
>
> ii) How can I set the abline feature to show a horizontal line at different points on the y-axis for each of the two graphs?
>
> Any help would be highly appreciated.
>
> many thanks.
>
>
>
>
>
>
>
>
> ---------------------------------
> Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

Does this get you closer?

xyplot(accuracy ~ percent|group,data = k, groups = method, allow.multiple = TRUE, scales = "same",type="o", par.settings=list(superpose.line = list(lty=1:2)), # added xlab = "% of genes", ylab = "Accuracy", main = " Accuracy ", aspect = 2/3,
panel = function(...) {
panel.superpose(...)
}
)

-- 
Tony 



		
---------------------------------

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed May 24 00:04:02 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 24 May 2006 - 16:10:20 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.