Search code examples
rscaleaxislabel

R: rescale labels


I have a plot in R with data on a range from 0-50 on the x axes. If I use the default labeling, I get this tick labels: 0,10,20,30,40,50 As I know that these values are in reality divided by two, I would like to rescale the labels to: 0, 5, 10, 15, 20, 25. Where the label now says 10, it should show 5 aso.

I tried different adjustments of:

axis(, at=c().. and ,labels())

but without any success.


Solution

  • As provied in the first comment, this works: Plotting the data as

    plot(XData/2, Ydata, ...)
    

    works very well.