Re: [R] dot plot by group
On Mon, Oct 11, 2010 at 12:55 PM, casperyc caspe...@hotmail.co.uk wrote: And now I just wonder why the ' bty='n' ' won't work? I did dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT',bty='n') and tried other bty parameters, none is working As David says, par settings don't work in lattice (see 'Note' in ?Lattice). Lattice doesn't have a bty equivalent (I don't think they make sense for multipanel plots). But you might consider this as a starting point: dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT', par.settings = list(axis.line = list(col = transparent))) -Deepayan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] dot plot by group
Thanks. It was 'bty=n' on a text graph, I was just having fun with it. It does not really matter that much. CasperYC -- View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p3004323.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] dot plot by group
Hi all, I have the folloing data table %% TypeBATCH RESPONSE SHORT A 22 SHORT A 3 SHORT A 16 SHORT A 14 SHORT A 8 SHORT A 27 SHORT A 11 SHORT A 17 SHORT B 12 SHORT B 17 SHORT B 11 SHORT B 10 SHORT B 16 SHORT B 18 SHORT B 15 SHORT B 13 SHORT B 9 SHORT B 20 SHORT C 4 SHORT C 16 SHORT C 32 SHORT C 11 SHORT C 9 SHORT C 25 SHORT C 27 SHORT C 12 SHORT C 26 SHORT C 7 SHORT C 14 LONGA 12 LONGA 7 LONGA 19 LONGA 19 LONGA 11 LONGA 33 LONGA 20 LONGA 25 LONGB 24 LONGB 6 LONGB 39 LONGB 14 LONGB 17 LONGB 10 LONGB 22 LONGB 35 LONGB 33 LONGB 21 LONGC 15 LONGC 11 LONGC 17 LONGC 8 LONGC 2 LONGC 10 LONGC 16 LONGC 21 LONGC 9 LONGC 19 LONGC 23 %% This is read into object 'd'. I produce the dot plot by, library(lattice) dotplot(BATCH~RESPONSE,data=d,groups=Type) How do I seperately plot them by 'Type'? I have tried using dotplot(BATCH~RESPONSE,data=d,groups=Type==SHORT) dotplot(BATCH~RESPONSE,data=d$Type=='SHORT') ect Thanks. Casper -- View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990469.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] dot plot by group
Casper - I think you want dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT') or dotplot(BATCH~RESPONSE,data=subset(d,Type=='SHORT')) - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spec...@stat.berkeley.edu On Mon, 11 Oct 2010, casperyc wrote: Hi all, I have the folloing data table %% TypeBATCH RESPONSE SHORT A 22 SHORT A 3 SHORT A 16 SHORT A 14 SHORT A 8 SHORT A 27 SHORT A 11 SHORT A 17 SHORT B 12 SHORT B 17 SHORT B 11 SHORT B 10 SHORT B 16 SHORT B 18 SHORT B 15 SHORT B 13 SHORT B 9 SHORT B 20 SHORT C 4 SHORT C 16 SHORT C 32 SHORT C 11 SHORT C 9 SHORT C 25 SHORT C 27 SHORT C 12 SHORT C 26 SHORT C 7 SHORT C 14 LONGA 12 LONGA 7 LONGA 19 LONGA 19 LONGA 11 LONGA 33 LONGA 20 LONGA 25 LONGB 24 LONGB 6 LONGB 39 LONGB 14 LONGB 17 LONGB 10 LONGB 22 LONGB 35 LONGB 33 LONGB 21 LONGC 15 LONGC 11 LONGC 17 LONGC 8 LONGC 2 LONGC 10 LONGC 16 LONGC 21 LONGC 9 LONGC 19 LONGC 23 %% This is read into object 'd'. I produce the dot plot by, library(lattice) dotplot(BATCH~RESPONSE,data=d,groups=Type) How do I seperately plot them by 'Type'? I have tried using dotplot(BATCH~RESPONSE,data=d,groups=Type==SHORT) dotplot(BATCH~RESPONSE,data=d$Type=='SHORT') ect Thanks. Casper -- View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990469.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] dot plot by group
Hi Spector, Yes, that is exactly what I was aiming for. Thanks. Casper -- View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990495.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] dot plot by group
And now I just wonder why the ' bty='n' ' won't work? I did dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT',bty='n') and tried other bty parameters, none is working Casper -- View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990500.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] dot plot by group
On Oct 11, 2010, at 3:55 PM, casperyc wrote: And now I just wonder why the ' bty='n' ' won't work? Left open is the answer to the question ... work ... how? Because dotplot is a lattice function? ... and bty is a base graphic parameter? You could try to give par.settings a list that consisted of bty='n'. (Failed, and since it fails you should look at the axis parameters of the lattice.options section in the help page.) You probably need to print out the lattice settings and then work toward reconfiguring them for you plot with trellis.par.set: print(trellis.par.get()) This does work (and suggests I misread the intent of Sarkar in his help page, but it remains unclear how you _wanted_ it to work. dotplot(variety ~ yield | year * site, data=barley, trellis.par.set(bty='n' ) ) I did dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT',bty='n') and tried other bty parameters, none is working Casper -- View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990500.html Sent from the R help mailing list archive at Nabble.com. David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.