 # change unit... plot R

hi guys,
I've a problem with the axes because, I want to plot like x axis 0 to 3 and like y axis 0 to frequency x, but without 3.5, 2.5 etc.... How can i fix it?

kind regards!

Here is an example of using the default axis tick marks and then using customized ones.

``````DF <- data.frame(ColA = 1:3, ColB = 1:3)
plot(ColB ~ ColA, data = DF) #original plot

#modified axes
plot(ColB ~ ColA, data = DF, xaxt = 'n', yaxt = 'n')
axis(side = 1, at=1:3)
axis(side = 2, at=1:3)
``````

I found a way to change the unit but I want to know How to remove the gap on x and y axes from the point 0,0 on x and y...

kind regards

thank you @FJCC or the answer, but see this image.... this is the result how can I fix it? this is really strange!

this answer solved my request thank you!

I am not sure exactly what you want to change about the plot. Below is an example of changing how the two axes cross.

It would be easier to help you if you would make a reproducible example (reprex) rather than post pictures of your code. Here is a tutorial about that.

``````DF <- data.frame(X=0:3,Y=4:1)

plot(DF, ylim = c(0,4))
`````` ``````#bty = "n" suppresses the printing of the box around the plot.
plot(DF, xaxt = "n", yaxt = "n", bty = "n", ylim = c(0,4))
axis(side = 1, pos = 0)
axis(side = 2, pos = 0)
`````` Created on 2020-11-17 by the reprex package (v0.3.0)