Skip to content

problem with origin of a plot

4 messages · jpardila, Dimitris Rizopoulos, David Winsemius

#
Dear list,
I have somewhat a small problem with a plot in  R. I want to produce a plot
with the two axis intersection being the exact values of ( 5,6).

The code i am using is" 

BN<-c(14.95,9.03,10.42,9.3,9.52,7.73,6.35,6.73,5.54,5.42,6.24,5.98,6.21,5.83,7.14,5.79,5.57,7.43,9.19,10.17,9.79,9.56,9.87,9.33,10.56,10.08,9.49,8.49,7.34,6.14,5.98,7.27,5.56,
7.3,6.14,6.37,5.14,5.53,5.64,6.55,7.04,9.41,9.59,9.92,10.77,9.77,10.26,8.71,8.91,9.7)

plot(BN, xlim=c(5,10),ylim=c(6,14))

When I input this code the origin of the plot is a few units before 5 and 6
but not exactly 5,6. I guess there is a parameter that i have to modify in
par or plot options but I haven't figure it out yet.

Please help.
#
try this:

plot(BN, xlim=c(5,10),ylim=c(6,14), xaxs = "i", yaxs = "i")


I hope it helps.

Best,
Dimitris
jpardila wrote:

  
    
#
On Jan 20, 2010, at 6:42 AM, jpardila wrote:

            
4% to be precise.
?par

Try:
plot(BN, xlim=c(5,10),ylim=c(6,14), yaxs="i", xaxs="i")
David Winsemius, MD
Heritage Laboratories
West Hartford, CT