Skip to content
Prev 168710 / 398502 Next

identifying what labels have been created in a plot

on 01/30/2009 10:51 AM Dennis Fisher wrote:
See ?axis, where in the Details, it will lead you to ?axTicks

plot(c(0, 70), c(0, 70))

# Y axis tick marks
[1]  0 10 20 30 40 50 60 70


pretty() will also get you similar information, save when using log scaling:
[1]  0 10 20 30 40 50 60 70


Keep in mind that you can always explicitly call axis() using the 'at'
argument to specify the locations of the tick marks and labels, after
plotting something without the axes being drawn by default.

HTH,

Marc Schwartz