I want to understand how plot()
exactly work under the hood. But it eventually depends on C to make the actual plots.
R> plot
function (x, y, ...)
UseMethod("plot")
<bytecode: 0x7f9c23a7d6f0>
<environment: namespace:base>
R> plot.xy
function (xy, type, pch = par("pch"), lty = par("lty"), col = par("col"),
bg = NA, cex = 1, lwd = par("lwd"), ...)
invisible(.External.graphics(C_plotXY, xy, type, pch, lty, col,
bg, cex, lwd, ...))
<bytecode: 0x7f90f80ef3b0>
<environment: namespace:graphics>
Can anybody provide a translation (automated is preferred, but I understand there may not be one, if so, manually translated code for an example like plot(1:10, 1:10)
is also OK) to the R language so that the points/axis/labels, etc., are plotted one by one (and how the positions are computed) so that I can see how plot()
works under the hood?