Re: [R] Why does plot() ignore the data type for axis labels?

From: Stiffler <>
Date: Tue, 19 Feb 2008 14:40:46 -0800 (PST)

Mark Difford wrote:

>>> I was wondering why the plot() command ignores the datatype when
>>> displaying axis labels...

> plot() doesn't ignore the datatype:
> [...]
> plot(x,y) calls xy.coords(), which recasts x as: x = as.double(x), which
> is fine, since x is (also/primarily) numeric.
> HTH, Mark.

Thanks for the explanation Mark.

If integers are being recast as doubles R is ignoring/overriding the user's choice of data-type. There may be good reasons for doing that internally (uniformity, code re-use etc) , but it is not what I'd expect as an end-user --- neither ?plot nor ?xy.coords seem to mention that coordinates need to be floating point numbers.

Best regards,

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 19 Feb 2008 - 23:08:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Feb 2008 - 00:30:16 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive