SverigeKile SverigeKile - 1 month ago 4
R Question

R - plotted data points are indistinguishable

W = c(20000, 5000, 3000, 8, 2, 0.5)
BMR = c(19000, 12000, 960, 86, 30, 10)
BMRPlot <- plot(W, BMR, main='Graph 2', cex=1.25, pch=21, bg='blue', lwd=1)

The above is the data I am trying to plot, however as you can probably tell the final data points once plotted appear to be indistinguishable as they are so close together. What could I add to my line of code that would change the view of this so that all points could be visible?


In a situation like this, you more or less have to use a transformation to make all the points visible. Otherwise, the points would have to be incredibly small not to overlap, and then you wouldn't be able to see them.

A log transformation of x and y seems to work here.

logW = log(c(20000, 5000, 3000, 8, 2, 0.5))
logBMR = log(c(19000, 12000, 960, 86, 30, 10))
BMRPlot <- plot(logW, logBMR, main='Graph 2', cex=1.25, pch=21, bg='blue', lwd=1)

enter image description here