madr
2010-Nov-21 16:49 UTC
[R] how to get rid of unused space on all 4 borders in plot() render
x= c(1,5,7,-3,4) y= c(2,4,-5,2,5) plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0, 0, 0, 0.5),yaxt="n", ann=FALSE) and this code produces: http://i53.tinypic.com/ffd7d3.png Where I marked in red areas that I want to get rid of and use as much real screen estate as I can. -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-rid-of-unused-space-on-all-4-borders-in-plot-render-tp3052527p3052527.html Sent from the R help mailing list archive at Nabble.com.
David Winsemius
2010-Nov-21 16:58 UTC
[R] how to get rid of unused space on all 4 borders in plot() render
On Nov 21, 2010, at 11:49 AM, madr wrote:> > x= c(1,5,7,-3,4) > y= c(2,4,-5,2,5) > plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0, > 0, 0, > 0.5),yaxt="n", ann=FALSE) >Rather than filling up r-help with incremental beginner questions you need to either: --- read more introductory material such as found here: http://cran.r-project.org/other-docs.html --- or read more of the help documents. In this case ?par> and this code produces: > http://i53.tinypic.com/ffd7d3.png > > Where I marked in red areas that I want to get rid of and use as > much real > screen estate as I can. > -- > View this message in context: http://r.789695.n4.nabble.com/how-to-get-rid-of-unused-space-on-all-4-borders-in-plot-render-tp3052527p3052527.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.David Winsemius, MD West Hartford, CT
John Kane
2010-Nov-21 17:41 UTC
[R] how to get rid of unused space on all 4 borders in plot() render
Alternatively give ggplot2 package a try: x= c(1,5,7,-3,4) y= c(2,4,-5,2,5) xx <- data.frame(x,y) library(ggplot2) qplot(x,y, data=xx) --- On Sun, 11/21/10, madr <madrazel at interia.pl> wrote:> From: madr <madrazel at interia.pl> > Subject: [R] how to get rid of unused space on all 4 borders in plot() render > To: r-help at r-project.org > Received: Sunday, November 21, 2010, 11:49 AM > > x= c(1,5,7,-3,4) > y= c(2,4,-5,2,5) > plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col > rgb(0, 0, 0, > 0.5),yaxt="n", ann=FALSE) > > and this code produces: > http://i53.tinypic.com/ffd7d3.png > > Where I marked in red areas that I want to get rid of and > use as much real > screen estate as I can. > -- > View this message in context: http://r.789695.n4.nabble.com/how-to-get-rid-of-unused-space-on-all-4-borders-in-plot-render-tp3052527p3052527.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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. >
madr
2010-Nov-21 18:31 UTC
[R] how to get rid of unused space on all 4 borders in plot() render
I have looked into par documentation, and only setting for size of the plot area was pin. But this setting sets the area as inflexible, that is no matter how I make the window small or big it stays the same. Default value has advantage that however it uses plot area that is always smaller than device area still this area is changing with the window and able to be bigger. -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-rid-of-unused-space-on-all-4-borders-in-plot-render-tp3052527p3052631.html Sent from the R help mailing list archive at Nabble.com.
Maybe Matching Threads
- increase or decrease variable by 1
- "negative alpha" or custom gradient colors of data dots in scatterplot ?
- [beginner] simple keyword to exit script ?
- longer object length is not a multiple of shorter object length
- I need a very specific unique like function and I don't know even how to properly call this