[R] get plot axis rounding method

Duncan Murdoch murdoch.duncan at gmail.com
Fri Apr 27 17:01:00 CEST 2012

On 27/04/2012 10:55 AM, Ben quant wrote:
> Hello,
> Does anyone know how to get the rounding method used for the axis tick
> numbers/values in plot()?
> I'm using mtext() to plot the values used to plot vertical and horizontal
> lines (using abline()) and I'd like these vertical and horizontal line
> values to be rounded like the axis tick values are rounded.
> In other words, I want numbers plotted with mtext() to be rounded in the
> same fashion as the axis values given by default by plot().
> thank you very much for your help!

See ?axTicks or ?pretty.

Duncan Murdoch

More information about the R-help mailing list