plot: Decimal point accuracy on the axis

前端 未结 1 1978
北海茫月
北海茫月 2021-01-05 16:04

I have two columns of data, X and Y with each entry having 4 places of data after the decimal in both the vectors.

When I make the simple

相关标签:
1条回答
  • 2021-01-05 16:28

    One option is use axis to customize your labels. Here a comparaion between the same plot using the default axis of plot and using axis function.

    op <- par(mfrow = c(2,1))
    set.seed(1)
    rr <- rnorm(5)
    plot(rr, 1:5,  frame.plot = TRUE)
    plot(rr, 1:5, axes = FALSE, frame.plot = TRUE)
    my.at <- round(rr,4)
    axis(1, at = my.at, labels = my.at)
    

    enter image description here

    0 讨论(0)
提交回复
热议问题