smoothScatter axis limits
2
0
Entering edit mode
Rob Scharpf ▴ 250
@rob-scharpf-1931
Last seen 9.6 years ago
Hi all, Is it possible to define your own axis limits in smoothScatter? For instance, > x <- rnorm(1000) > y <- rnorm(1000) > smoothScatter(x, y, xlim=c(-10, 10), ylim=c(-5,5)) does not produce the intended result. Suggestions? Session info below... Thanks, Rob > sessionInfo() R version 2.6.0 Under development (unstable) (2007-04-27 r41355) powerpc-apple-darwin8.9.0 locale: C attached base packages: [1] "tools" "stats" "graphics" "grDevices" "utils" "datasets" [7] "methods" "base" other attached packages: KernSmooth geneplotter lattice annotate Biobase "2.22-20" "1.15.1" "0.15-4" "1.13.8" "1.15.2"
annotate geneplotter annotate geneplotter • 2.2k views
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 3 months ago
EMBL European Molecular Biology Laborat…
Hi Rob , currently this is not implemented, but it would not be difficult to do that (have a look at the function definition and that of geneplotter:::.smoothScatterCalcDensity). Patches are welcome :) For now, a pragmatic way to circumvent this is to subset x and y in your code example to remain within the intended ranges before calling smoothScatter. Best wishes Wolfgang Scharpf ha scritto: > Hi all, > > Is it possible to define your own axis limits in smoothScatter? For > instance, > > > x <- rnorm(1000) > > y <- rnorm(1000) > > smoothScatter(x, y, xlim=c(-10, 10), ylim=c(-5,5)) > > does not produce the intended result. Suggestions? Session info > below... > > Thanks, > > Rob > > > sessionInfo() > > R version 2.6.0 Under development (unstable) (2007-04-27 r41355) > powerpc-apple-darwin8.9.0 > > locale: > C > > attached base packages: > [1] "tools" "stats" "graphics" "grDevices" "utils" > "datasets" > [7] "methods" "base" > > other attached packages: > KernSmooth geneplotter lattice annotate Biobase > "2.22-20" "1.15.1" "0.15-4" "1.13.8" "1.15.2" >
ADD COMMENT
0
Entering edit mode
@jdelasherasedacuk-1189
Last seen 8.6 years ago
United Kingdom
Hi Rob, I tried your example, as I use smoothScatter often too and define my own limits without problem. Your example _does_ work as intended on my system... no problem. (?) > sessionInfo() R version 2.5.0 (2007-04-23) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] "tools" "stats" "graphics" "grDevices" "datasets" "tcltk" [7] "utils" "methods" "base" other attached packages: geneplotter lattice annotate Biobase svSocket svIO "1.14.0" "0.15-4" "1.14.1" "1.14.0" "0.9-5" "0.9-5" R2HTML svMisc svIDE "1.58" "0.9-5" "0.9-5" Jose Quoting Rob Scharpf <rscharpf at="" jhsph.edu="">: > Hi all, > > Is it possible to define your own axis limits in smoothScatter? For > instance, > > > x <- rnorm(1000) > > y <- rnorm(1000) > > smoothScatter(x, y, xlim=c(-10, 10), ylim=c(-5,5)) > > does not produce the intended result. Suggestions? Session info > below... > > Thanks, > > Rob > > > sessionInfo() > > R version 2.6.0 Under development (unstable) (2007-04-27 r41355) > powerpc-apple-darwin8.9.0 > > locale: > C > > attached base packages: > [1] "tools" "stats" "graphics" "grDevices" "utils" > "datasets" > [7] "methods" "base" > > other attached packages: > KernSmooth geneplotter lattice annotate Biobase > "2.22-20" "1.15.1" "0.15-4" "1.13.8" "1.15.2" > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > -- Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK
ADD COMMENT
0
Entering edit mode
This is something on the devel version of geneplotter, where smoothScatter has two formal arguments: xlim and ylim (which do not exist on the stable version). Given the above, matching the arguments in "..." does not work for xlim/ylim, as these two are used as arguments to "zoom" the data. Note that this problem would be fixed by renaming xlim/ylim to something else, like z.xlim/z.ylim. b On Jun 2, 2007, at 11:08 AM, J.delasHeras at ed.ac.uk wrote: > > Hi Rob, > > I tried your example, as I use smoothScatter often too and define my > own limits without problem. Your example _does_ work as intended on my > system... no problem. (?) > >> sessionInfo() > R version 2.5.0 (2007-04-23) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United > Kingdom.1252;LC_MONETARY=English_United > Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 > > attached base packages: > [1] "tools" "stats" "graphics" "grDevices" "datasets" > "tcltk" > [7] "utils" "methods" "base" > > other attached packages: > geneplotter lattice annotate Biobase svSocket > svIO > "1.14.0" "0.15-4" "1.14.1" "1.14.0" "0.9-5" > "0.9-5" > R2HTML svMisc svIDE > "1.58" "0.9-5" "0.9-5" > > Jose > > > > > > > Quoting Rob Scharpf <rscharpf at="" jhsph.edu="">: > >> Hi all, >> >> Is it possible to define your own axis limits in smoothScatter? For >> instance, >> >>> x <- rnorm(1000) >>> y <- rnorm(1000) >>> smoothScatter(x, y, xlim=c(-10, 10), ylim=c(-5,5)) >> >> does not produce the intended result. Suggestions? Session info >> below... >> >> Thanks, >> >> Rob >> >>> sessionInfo() >> >> R version 2.6.0 Under development (unstable) (2007-04-27 r41355) >> powerpc-apple-darwin8.9.0 >> >> locale: >> C >> >> attached base packages: >> [1] "tools" "stats" "graphics" "grDevices" "utils" >> "datasets" >> [7] "methods" "base" >> >> other attached packages: >> KernSmooth geneplotter lattice annotate Biobase >> "2.22-20" "1.15.1" "0.15-4" "1.13.8" "1.15.2" >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> > > > > -- > Dr. Jose I. de las Heras Email: > J.delasHeras at ed.ac.uk > The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 > 6513374 > Institute for Cell & Molecular Biology Fax: +44 (0)131 > 6507360 > Swann Building, Mayfield Road > University of Edinburgh > Edinburgh EH9 3JR > UK > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/ > gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Thanks! I verified that the smoothScatter axis limits work in the 2.5 release (it does). If my patch for the devel release isn't a complete hack, i'll pass it along to Wolfgang. Best regards, Rob On Jun 2, 2007, at 11:08 AM, J.delasHeras at ed.ac.uk wrote: > > Hi Rob, > > I tried your example, as I use smoothScatter often too and define > my own limits without problem. Your example _does_ work as intended > on my system... no problem. (?) > >> sessionInfo() > R version 2.5.0 (2007-04-23) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United > Kingdom.1252;LC_MONETARY=English_United Kingdom. > 1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 > > attached base packages: > [1] "tools" "stats" "graphics" "grDevices" "datasets" > "tcltk" > [7] "utils" "methods" "base" > > other attached packages: > geneplotter lattice annotate Biobase svSocket > svIO > "1.14.0" "0.15-4" "1.14.1" "1.14.0" "0.9-5" > "0.9-5" > R2HTML svMisc svIDE > "1.58" "0.9-5" "0.9-5" > > Jose > > > > > > > Quoting Rob Scharpf <rscharpf at="" jhsph.edu="">: > >> Hi all, >> >> Is it possible to define your own axis limits in smoothScatter? For >> instance, >> >> > x <- rnorm(1000) >> > y <- rnorm(1000) >> > smoothScatter(x, y, xlim=c(-10, 10), ylim=c(-5,5)) >> >> does not produce the intended result. Suggestions? Session info >> below... >> >> Thanks, >> >> Rob >> >> > sessionInfo() >> >> R version 2.6.0 Under development (unstable) (2007-04-27 r41355) >> powerpc-apple-darwin8.9.0 >> >> locale: >> C >> >> attached base packages: >> [1] "tools" "stats" "graphics" "grDevices" "utils" >> "datasets" >> [7] "methods" "base" >> >> other attached packages: >> KernSmooth geneplotter lattice annotate Biobase >> "2.22-20" "1.15.1" "0.15-4" "1.13.8" "1.15.2" >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/ >> gmane.science.biology.informatics.conductor >> >> > > > > -- > Dr. Jose I. de las Heras Email: > J.delasHeras at ed.ac.uk > The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 > 6513374 > Institute for Cell & Molecular Biology Fax: +44 (0)131 > 6507360 > Swann Building, Mayfield Road > University of Edinburgh > Edinburgh EH9 3JR > UK
ADD REPLY

Login before adding your answer.

Traffic: 940 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6