[R] why is generating the same graph???

David Winsemius dwinsemius at comcast.net
Thu Feb 23 02:51:08 CET 2012

On Feb 22, 2012, at 7:08 PM, Vanúcia Schumacher wrote:

> Hi,
> why my script iss always generating the same graph?when I change the  
> parameters and the name of text file?
> library(MASS)
> dados<-read.table("inverno.txt",header=FALSE)
> vento50<-fitdistr(dados[[1]],densfun="weibull")
> png(filename="invernoRG.png",width=800,height=600)
> hist(dados[[1]], seq(0, 18, 0.5), prob=TRUE, xlab="Velocidade (m/ 
> s)",ylab="Densidade", main="50 m")
> curve(dweibull(x, shape=0.614, scale=2.435), 0,18,add=T, col='red')
> dev.off()

Color me puzzled:

You are complaining that the same graph is produced when you give it  
the same data?

David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list