[R] plot(x,y xlab=NULL,ylab=NULL) but labels still visible.
Labels are still present on graph render, their names are x and y that is the same as I used on the variables to supply data for chart. How to get rid of them. -- View this message in context: http://r.789695.n4.nabble.com/plot-x-y-xlab-NULL-ylab-NULL-but-labels-still-visible-tp3052439p3052439.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] plot(x,y xlab=NULL,ylab=NULL) but labels still visible.
On Nov 21, 2010, at 10:21 AM, madr wrote: Labels are still present on graph render, their names are x and y that is the same as I used on the variables to supply data for chart. How to get rid of them. The term labels as used in functions is different than the graphical objects affected by xlab and ylab. Those are really titles ?title ?plot.default # which you should have consulted while you were using the help(plot) information. Use one of axes, xaxt or yaxt To indicate both or which axis to suppress. -- 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.
Re: [R] plot(x,y xlab=NULL,ylab=NULL) but labels still visible.
here's the code 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), xaxt=NULL,yaxt=NULL, xlab=NULL,ylab=NULL) and x and y are still visible -- View this message in context: http://r.789695.n4.nabble.com/plot-x-y-xlab-NULL-ylab-NULL-but-labels-still-visible-tp3052439p3052482.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] plot(x,y xlab=NULL,ylab=NULL) but labels still visible.
Replace the xlab=NULL and ylab=NULL in your example code with xlab= and ylab= to remove the x and y labels on your axes. If you're also trying to remove the ticks and tick labels, substitute xaxt=n and yaxt=n into your code. 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), xaxt=NULL,yaxt=NULL, xlab=,ylab=) On Sun, Nov 21, 2010 at 11:02 AM, madr madra...@interia.pl wrote: here's the code 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), xaxt=NULL,yaxt=NULL, xlab=NULL,ylab=NULL) and x and y are still visible -- View this message in context: http://r.789695.n4.nabble.com/plot-x-y-xlab-NULL-ylab-NULL-but-labels-still-visible-tp3052439p3052482.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. -- ___ Luke Miller Postdoctoral Researcher Marine Science Center Northeastern University Nahant, MA (781) 581-7370 x318 [[alternative HTML version deleted]] __ 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] plot(x,y xlab=NULL,ylab=NULL) but labels still visible.
On Nov 21, 2010, at 11:02 AM, madr wrote: here's the code 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), xaxt=NULL,yaxt=NULL, xlab=NULL,ylab=NULL) and x and y are still visible ?par for valid xaxt and yaxt values. And unlearn the use of NULL for argument values. You generally are going to want to provide something (NA or ) and in R NULL is nothing. See if this is closer to what you wanted 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), xaxt=n, yaxt=n, xlab=,ylab=) -- 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.
Re: [R] plot(x,y xlab=NULL,ylab=NULL) but labels still visible.
On 2010-11-21 08:02, madr wrote: here's the code 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), xaxt=NULL,yaxt=NULL, xlab=NULL,ylab=NULL) and x and y are still visible If you just want to remove both axis titles (xlab and ylab), use plot(, ann = FALSE). If you want both axes to be free of ticks, etc, use plot(, ann = FALSE, axes = FALSE). This will also remove the 'box' around the plot; you can add that back with plot() box() It's useful to study the documentation for ?plot.default to which you are directed by ?plot. Peter Ehlers __ 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.