Determining the exact lower right corner of R

In the R section below ( run to see ), I want the green vertical to abline() be exactly anchored to the lower right corner of my plot; that is, exactly where the red and blue ends are highlighted in the lower right corner of my plot .

Keeping everything in my plot, what is x of this point? par("usr")[2]didn't help as shown in my code below:

curve(df(x,1,28,ncp = 1.875),0,11,col="blue",lwd=3,ylim=c(0,1),xpd=T,bty="n",axes=F)
curve(df(x,1,28), add=T,col="red",lwd=2)
axis(1,pos=0)
axis(2,pos=0)

abline(v=par("usr")[2],col="green")   ## I'm using par("usr")[2] here with no success ##
+4
source share
1 answer

4% . ,

size = (par("usr")[2]-par("usr")[1])/1.08
size
11

par("usr")[2]- 0.04*size   
11

, R, , xaxs="i"

+3

Source: https://habr.com/ru/post/1667513/


All Articles