Dear Researchers, sorry for the easy question but Is it possible to plot with an interval of 1 or .5 in a plot using ylim? Thanks gianni x = 0:10; y = 0:10; plot(x~y,ylim=c(0,10),las=1) [[alternative HTML version deleted]]
Hi Gianni, Yes, take a look at x <- y <- 1:10 plot(x, y, ylim=c(0,10),las=1, yaxt = 'n') axis(2, seq(0, 10, by = .5), seq(0, 10, by = .5), las = 2) plot(x, y, ylim=c(0,10),las=1, yaxt = 'n') axis(2, seq(0, 10, by = 1), seq(0, 10, by = 1), las = 2) Also, check ?plot and ?par for more details. HTH, Jorge.- On Mon, Jan 30, 2012 at 1:28 PM, gianni lavaredo <> wrote:> Dear Researchers, > > sorry for the easy question but Is it possible to plot with an interval of > 1 or .5 in a plot using ylim? > > Thanks > gianni > > x = 0:10; > y = 0:10; > > plot(x~y,ylim=c(0,10),las=1) > > [[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. >[[alternative HTML version deleted]]
On Jan 30, 2012, at 1:28 PM, gianni lavaredo wrote:> Dear Researchers, > > sorry for the easy question but Is it possible to plot with an > interval of > 1 or .5 in a plot using ylim? > > Thanks > gianni > > x = 0:10; > y = 0:10; > > plot(x~y,ylim=c(0,10),las=1)plot(x~y,ylim=c(0,10), xaxt="n") axis(1, at=seq(0, 10, by=0.5) , labels= seq(0, 10, by=0.5), cex.axis=0.75) Unless you make the cex.axis number small enough, axis() won't put them all in.> > [[alternative HTML version deleted]] > > ______________________________________________ > 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 Heritage Laboratories West Hartford, CT
Apparently Analagous Threads
- help with Box plot
- help to slip a file name using "strsplit" function
- question how to add Standard Deviation as "Whiskers" in a simple plot
- plot a BARPLOT with sd deviation bar up and down
- how disable the Error massage in read.table() " no lines available in input"