Re: [R] plot start at origin

2010-11-22 Thread Uwe Ligges



On 22.11.2010 07:44, Roslina Zakaria wrote:

Hi r-users,

I would like my axes to intersect at (0,0).  I tried  xaxs=i,yaxs=i but it
does not change anything.  I hope anybody can help me with this problem.  Here
is my code.




use

par(xaxs=i, yaxs=i)

and then the rest of your code.

UWe Ligges


hist(datobs, prob=TRUE, main =PDF of the sum of two
stations,col=yellowgreen, cex.axis=1.2,
xlab=Rainfall (mm), ylab=Relative frequency, ylim= c(0,.008),
xlim=c(0,600),xaxs=i,yaxs=i)
lines(density(dd), lwd=3,col=red)
legend(topright, legend = c(observed,fitted),
col = c(yellowgreen, red), pch=c(15,NA), lty = c(0, 1),
lwd=c(0,3),bty=n, pt.cex=2)
box()

Thank you.



[[alternative HTML version deleted]]




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] plot start at origin

2010-11-21 Thread Roslina Zakaria
Hi r-users,

I would like my axes to intersect at (0,0).  I tried  xaxs=i,yaxs=i but it 
does not change anything.  I hope anybody can help me with this problem.  Here 
is my code.

hist(datobs, prob=TRUE, main =PDF of the sum of two 
stations,col=yellowgreen, cex.axis=1.2,
xlab=Rainfall (mm), ylab=Relative frequency, ylim= c(0,.008), 
xlim=c(0,600),xaxs=i,yaxs=i)
lines(density(dd), lwd=3,col=red)
legend(topright, legend = c(observed,fitted),
   col = c(yellowgreen, red), pch=c(15,NA), lty = c(0, 1),
   lwd=c(0,3),bty=n, pt.cex=2)
box()

Thank you.


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.