Question: can not transpose ggplot2 smooth line

0

mbk0asis •

**410**wrote:Hi,

I was trying to draw scatter plots with smooth lines using ggplot2. When I transpose X/Y axis (data), the smooth line didn't.

I thought smooth lines were to show the trend of data. Am I misunderstanding?

When I changed below

p <- qplot(log2(countsNormalized[,1]+1),log2(countsNormalized[,4]+1),xlab="A", ylab="B",alpha=0.9) p + geom_smooth(method="lm",se=F) + geom_abline(intercept = 0,linetype="dotted") + geom_point(size=3) + stat_smooth_func(geom="text",method="lm",hjust=0,parse=TRUE)

to next

p <- qplot(log2(countsNormalized[,4]+1),log2(countsNormalized[,1]+1),xlab="A", ylab="B",alpha=0.9) p + geom_smooth(method="lm",se=F) + geom_abline(intercept = 0,linetype="dotted") + geom_point(size=3) + stat_smooth_func(geom="text",method="lm",hjust=0,parse=TRUE)

the smooth line stayed the same.

Any ideas would be helpful. Thanks.

By the way, how can I put picture here?

410