Reputation: 2893
I'm using R with R-Studio. How can I re-scale the axis of a plot I made using plot(...)
? The only option I see at this point is to Zoom in, which pretty much displays the dame graph on the entire screen..
EDIT:
I will explain better the use case I'm looking for:
Assume I'm plotting the next graph: plot(c(1,2),c(3,4))
. This will yield the following graph:
Then I want to add another point:
points(1,5)
. Since the new point is beyond the axis boundaries, I cannot see it. How can I re-scale the axis so I can see all the points (without replotting everything)?
Upvotes: 1
Views: 9621
Reputation: 176
If by re-scale you mean to only display part of x
-axis or y
-axis, then you can add:
xlim=c(0,10), ylim=c(0,10)
This will only display point between 0 to 10 for the x
- and y
- axes. You can choose what values you wish to be displayed.
Upvotes: 1