[R] Question on qplot

RON70 ron_michael70 at yahoo.com
Sat Jul 18 12:35:42 CEST 2009


the plots I am getting is here :
http://www.2shared.com/file/6739681/d4c6c9d3/plot.html
and
http://www.2shared.com/file/6739673/bd50b430/plot.html

How you are getting transposed one?


smu-2 wrote:
> 
> hey,
> 
> On Sat, Jul 18, 2009 at 01:52:34AM -0700, RON70 wrote:
>> 
>> Hi, suppose I have following codes :
>> 
>> library(zoo); library(ggplot2)
>> dat <- matrix(rnorm(500*2), 500); dat <- zooreg(dat, start =
>> as.Date("01/01/01", "%m/%d/%y"), frequency=1); plot(dat)
>> head(dat); month.no <- format(index(dat), "%m"); dat1 <-
>> cbind(coredata(dat), as.numeric(month.no))
>> 
>> x <- dat1[,1]; y <- dat1[,2]; z <- dat1[,3]
>> 
>> 
>> Now I draw a qplot like :
>> qplot(x, z)
>> 
>> It is ok........
>> However if I reverse that like
>> qplot(z, x)
>> I am getting strange plot. I expected it should look just like transpose
>> of
>> above plot.
> 
> Using your code I get the transposed plot.
> 
> regards,
>  stefan
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-on-qplot-tp24545841p24546574.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list